Class: SportsDataApi::Nba::Games
- Inherits:
-
Object
- Object
- SportsDataApi::Nba::Games
- Includes:
- Enumerable
- Defined in:
- lib/sports_data_api/nba/games.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
Instance Method Summary collapse
- #each ⇒ Object
- #games ⇒ Object
-
#initialize(json) ⇒ Games
constructor
A new instance of Games.
Constructor Details
#initialize(json) ⇒ Games
8 9 10 11 |
# File 'lib/sports_data_api/nba/games.rb', line 8 def initialize(json) @json = json @date = json['date'] end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
6 7 8 |
# File 'lib/sports_data_api/nba/games.rb', line 6 def date @date end |
Instance Method Details
#each ⇒ Object
19 20 21 22 |
# File 'lib/sports_data_api/nba/games.rb', line 19 def each return games.each unless block_given? games.each { |game| yield game } end |