Class: NHLScores::CLI
- Inherits:
-
Thor
- Object
- Thor
- NHLScores::CLI
- Defined in:
- lib/nhl_scores/cli.rb
Instance Attribute Summary collapse
-
#games ⇒ Object
readonly
Returns the value of attribute games.
Instance Method Summary collapse
- #current ⇒ Object
-
#initialize(*args) ⇒ CLI
constructor
A new instance of CLI.
- #recent ⇒ Object
- #upcoming ⇒ Object
Constructor Details
Instance Attribute Details
#games ⇒ Object (readonly)
Returns the value of attribute games.
5 6 7 |
# File 'lib/nhl_scores/cli.rb', line 5 def games @games end |
Instance Method Details
#current ⇒ Object
21 22 23 24 |
# File 'lib/nhl_scores/cli.rb', line 21 def current games = @games.in_progress(team_abbrev: ['team']) output_games(games, 'current') end |
#recent ⇒ Object
14 15 16 17 |
# File 'lib/nhl_scores/cli.rb', line 14 def recent games = @games.recent(team_abbrev: ['team']) output_games(games, 'recent') end |
#upcoming ⇒ Object
28 29 30 31 |
# File 'lib/nhl_scores/cli.rb', line 28 def upcoming games = @games.upcoming(team_abbrev: ['team']) output_games(games, 'upcoming') end |