Class: ScoreScraper::Scoreboard
- Inherits:
-
Object
- Object
- ScoreScraper::Scoreboard
- Defined in:
- lib/score_scraper/scoreboard.rb
Direct Known Subclasses
ScoreScraper::Scoreboards::Mlb, ScoreScraper::Scoreboards::Nba
Instance Method Summary collapse
- #games(game_separator = '|') ⇒ Object
-
#initialize(search_date = nil, teams = []) ⇒ Scoreboard
constructor
A new instance of Scoreboard.
Constructor Details
#initialize(search_date = nil, teams = []) ⇒ Scoreboard
Returns a new instance of Scoreboard.
4 5 6 7 |
# File 'lib/score_scraper/scoreboard.rb', line 4 def initialize(search_date = nil, teams = []) @teams = teams @search_date = search_date || Time.now.strftime("%Y-%m-%d") end |
Instance Method Details
#games(game_separator = '|') ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/score_scraper/scoreboard.rb', line 9 def games(game_separator = '|') game_array = [] team_games.each do |game| game_array << single_game(game) end game_array.join(game_separator) end |