Class: Sportradar::Api::Basketball::Ncaamb::Bracket
- Defined in:
- lib/sportradar/api/basketball/ncaamb/bracket.rb
Instance Attribute Summary collapse
-
#end ⇒ Object
Returns the value of attribute end.
-
#id ⇒ Object
Returns the value of attribute id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#response ⇒ Object
Returns the value of attribute response.
-
#start ⇒ Object
Returns the value of attribute start.
Instance Method Summary collapse
-
#initialize(data, **opts) ⇒ Bracket
constructor
A new instance of Bracket.
- #update(data, **opts) ⇒ Object
Methods inherited from Data
#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data
Constructor Details
#initialize(data, **opts) ⇒ Bracket
Returns a new instance of Bracket.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/sportradar/api/basketball/ncaamb/bracket.rb', line 8 def initialize(data, **opts) @response = data @api = opts[:api] @tournament = opts[:tournament] @id = data['id'] @games_hash = {} update(data) end |
Instance Attribute Details
#end ⇒ Object
Returns the value of attribute end.
6 7 8 |
# File 'lib/sportradar/api/basketball/ncaamb/bracket.rb', line 6 def end @end end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/sportradar/api/basketball/ncaamb/bracket.rb', line 6 def id @id end |
#location ⇒ Object
Returns the value of attribute location.
6 7 8 |
# File 'lib/sportradar/api/basketball/ncaamb/bracket.rb', line 6 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/sportradar/api/basketball/ncaamb/bracket.rb', line 6 def name @name end |
#response ⇒ Object
Returns the value of attribute response.
6 7 8 |
# File 'lib/sportradar/api/basketball/ncaamb/bracket.rb', line 6 def response @response end |
#start ⇒ Object
Returns the value of attribute start.
6 7 8 |
# File 'lib/sportradar/api/basketball/ncaamb/bracket.rb', line 6 def start @start end |
Instance Method Details
#update(data, **opts) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/sportradar/api/basketball/ncaamb/bracket.rb', line 20 def update(data, **opts) @response = data @name = data['name'] if data['name'] @location = data['location'] if data['location'] # update_games(data['games']) if data['games'] update_participants(data['participants']) if data['participants'] self end |