Class: Sportradar::Api::Images::Asset
- Defined in:
- lib/sportradar/api/images/asset.rb
Instance Attribute Summary collapse
-
#copyright ⇒ Object
Returns the value of attribute copyright.
-
#created ⇒ Object
Returns the value of attribute created.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#links ⇒ Object
Returns the value of attribute links.
-
#player_id ⇒ Object
Returns the value of attribute player_id.
-
#refs ⇒ Object
Returns the value of attribute refs.
-
#response ⇒ Object
Returns the value of attribute response.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated ⇒ Object
Returns the value of attribute updated.
Instance Method Summary collapse
-
#initialize(data) ⇒ Asset
constructor
A new instance of Asset.
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) ⇒ Asset
Returns a new instance of Asset.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/sportradar/api/images/asset.rb', line 6 def initialize(data) @response = data @id = data["id"] @player_id = data["player_id"] @created = data["created"] @updated = data["updated"] @title = data["title"] @description = data["description"] @copyright = data["copyright"] @links = parse_into_array(selector: response["links"]["link"], klass: Sportradar::Api::Images::Link) if response["links"] && response["links"]["link"] @tags = parse_into_array(selector: response["tags"]["tag"], klass: Sportradar::Api::Images::Tag) if response["tags"] && response["tags"]["tag"] @refs = parse_into_array(selector: response["refs"]["ref"], klass: Sportradar::Api::Images::Ref) if response["refs"] && response["refs"]["ref"] end |
Instance Attribute Details
#copyright ⇒ Object
Returns the value of attribute copyright.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def copyright @copyright end |
#created ⇒ Object
Returns the value of attribute created.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def created @created end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def id @id end |
#links ⇒ Object
Returns the value of attribute links.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def links @links end |
#player_id ⇒ Object
Returns the value of attribute player_id.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def player_id @player_id end |
#refs ⇒ Object
Returns the value of attribute refs.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def refs @refs end |
#response ⇒ Object
Returns the value of attribute response.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def response @response end |
#tags ⇒ Object
Returns the value of attribute tags.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def @tags end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def title @title end |
#updated ⇒ Object
Returns the value of attribute updated.
4 5 6 |
# File 'lib/sportradar/api/images/asset.rb', line 4 def updated @updated end |