Class: SportsDataApi::Nfl::Season
- Inherits:
-
Object
- Object
- SportsDataApi::Nfl::Season
- Defined in:
- lib/sports_data_api/nfl/season.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(json) ⇒ Season
constructor
A new instance of Season.
- #weeks ⇒ Object
Constructor Details
#initialize(json) ⇒ Season
Returns a new instance of Season.
6 7 8 9 10 11 |
# File 'lib/sports_data_api/nfl/season.rb', line 6 def initialize(json) @json = json @id = json['id'] @year = json['year'] @type = json['type'].to_sym end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/sports_data_api/nfl/season.rb', line 4 def type @type end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
4 5 6 |
# File 'lib/sports_data_api/nfl/season.rb', line 4 def year @year end |