Class: ScoreScraper::Game

Inherits:
Object
  • Object
show all
Defined in:
lib/score_scraper/game.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ Game

Returns a new instance of Game.



5
6
7
8
9
# File 'lib/score_scraper/game.rb', line 5

def initialize(attrs)
  @home_team  = attrs[:home_team]  || {}
  @away_team  = attrs[:away_team]  || {}
  @game_state = attrs[:game_state] || ''
end

Instance Attribute Details

#away_teamObject (readonly)

Returns the value of attribute away_team.



3
4
5
# File 'lib/score_scraper/game.rb', line 3

def away_team
  @away_team
end

#game_stateObject (readonly)

Returns the value of attribute game_state.



3
4
5
# File 'lib/score_scraper/game.rb', line 3

def game_state
  @game_state
end

#home_teamObject (readonly)

Returns the value of attribute home_team.



3
4
5
# File 'lib/score_scraper/game.rb', line 3

def home_team
  @home_team
end