class NpbApi::Stats::Hitting
Public Class Methods
url_key()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 4 def self.url_key 'b' end
Public Instance Methods
at_bats()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 20 def at_bats @row.children[6].text.to_i end
bases_on_balls()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 68 def bases_on_balls @row.children[19].text.to_i end
batting_average()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 88 def batting_average @row.children[25].text.to_f end
caught_stealing()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 56 def caught_stealing @row.children[16].text.to_i end
double()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 32 def double @row.children[9].text.to_i end
games()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 12 def games @row.children[4].text.to_i end
grounded_into_double_play()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 84 def grounded_into_double_play @row.children[24].text.to_i end
hit_by_pitch()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 76 def hit_by_pitch @row.children[22].text.to_i end
hits()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 28 def hits @row.children[8].text.to_i end
home_runs()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 40 def home_runs @row.children[11].text.to_i end
intentional_bases_on_balls()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 72 def intentional_bases_on_balls @row.children[21].text.to_i end
on_base_percentage()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 96 def on_base_percentage @row.children[27].text.to_f end
on_base_plus_slugging()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 100 def on_base_plus_slugging slugging_percentage + on_base_percentage end
player()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 8 def player @row.children[2].children.text end
runs()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 24 def runs @row.children[7].text.to_i end
runs_batted_in()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 48 def runs_batted_in @row.children[14].text.to_i end
sacrifice_flies()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 64 def sacrifice_flies @row.children[18].text.to_i end
sacrifice_hits()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 60 def sacrifice_hits @row.children[17].text.to_i end
slugging_percentage()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 92 def slugging_percentage @row.children[26].text.to_f end
stolen_bases()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 52 def stolen_bases @row.children[15].text.to_i end
strikeouts()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 80 def strikeouts @row.children[23].text.to_i end
total_bases()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 44 def total_bases @row.children[13].text.to_i end
total_plate_appearances()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 16 def total_plate_appearances @row.children[5].text.to_i end
triple()
click to toggle source
# File lib/npb-api/stats/hitting.rb, line 36 def triple @row.children[10].text.to_i end