class SportsDataApi::Mlb::Statistics

Public Instance Methods

fielding() click to toggle source
# File lib/sports_data_api/mlb/statistics.rb, line 8
def fielding
  @fielding ||= orphan_stat :fielding
end
hitting() click to toggle source
# File lib/sports_data_api/mlb/statistics.rb, line 12
def hitting
  @hitting ||= orphan_stat :hitting
end
pitching() click to toggle source
# File lib/sports_data_api/mlb/statistics.rb, line 4
def pitching
  @pitching ||= orphan_stat :pitching
end

Private Instance Methods

orphan_stat(key) click to toggle source
# File lib/sports_data_api/mlb/statistics.rb, line 18
def orphan_stat(key)
  return unless statistics.has_key? key
  MergedStats.new(statistics[key]['overall'], key.to_s)
end