Class: ScoreScraper::Game
- Inherits:
-
Object
- Object
- ScoreScraper::Game
- Defined in:
- lib/score_scraper/game.rb
Instance Attribute Summary collapse
-
#away_team ⇒ Object
readonly
Returns the value of attribute away_team.
-
#game_state ⇒ Object
readonly
Returns the value of attribute game_state.
-
#home_team ⇒ Object
readonly
Returns the value of attribute home_team.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Game
constructor
A new instance of Game.
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_team ⇒ Object (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_state ⇒ Object (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_team ⇒ Object (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 |