class MLBGameday::Pitcher
Public Instance Methods
era()
click to toggle source
# File lib/mlb_gameday/pitcher.rb, line 5 def era @data.xpath('//Player/season/@era').text.to_f end
innings()
click to toggle source
# File lib/mlb_gameday/pitcher.rb, line 17 def innings @data.xpath('//Player/season/@ip').text.to_f end
losses()
click to toggle source
# File lib/mlb_gameday/pitcher.rb, line 13 def losses @data.xpath('//Player/season/@l').text.to_i end
saves()
click to toggle source
# File lib/mlb_gameday/pitcher.rb, line 21 def saves @data.xpath('//Player/season/@sv').text.to_i end
strikeouts()
click to toggle source
# File lib/mlb_gameday/pitcher.rb, line 29 def strikeouts @data.xpath('//Player/season/@so').text.to_i end
walks()
click to toggle source
# File lib/mlb_gameday/pitcher.rb, line 33 def walks @data.xpath('//Player/season/@bb').text.to_i end
whip()
click to toggle source
# File lib/mlb_gameday/pitcher.rb, line 25 def whip @data.xpath('//Player/season/@whip').text.to_f end
wins()
click to toggle source
# File lib/mlb_gameday/pitcher.rb, line 9 def wins @data.xpath('//Player/season/@w').text.to_i end