Class: Sportradar::Api::Soccer::Venue
- Defined in:
- lib/sportradar/api/soccer/venue.rb
Instance Attribute Summary collapse
-
#capacity ⇒ Object
readonly
Returns the value of attribute capacity.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#coordinates ⇒ Object
readonly
Returns the value of attribute coordinates.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#reference_id ⇒ Object
readonly
Returns the value of attribute reference_id.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(data) ⇒ Venue
constructor
A new instance of Venue.
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) ⇒ Venue
Returns a new instance of Venue.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sportradar/api/soccer/venue.rb', line 7 def initialize(data) @response = data @id = data["id"] @name = data["name"] @country_code = data["country_code"] @country = data["country"] || data["country_name"] @city = data["city"] || data["city_name"] @capacity = data["capacity"] @coordinates = data["coordinates"] || data["map_coordinates"] @reference_id = data["reference_id"] end |
Instance Attribute Details
#capacity ⇒ Object (readonly)
Returns the value of attribute capacity.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def capacity @capacity end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def city @city end |
#coordinates ⇒ Object (readonly)
Returns the value of attribute coordinates.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def coordinates @coordinates end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def country @country end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def country_code @country_code end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def name @name end |
#reference_id ⇒ Object (readonly)
Returns the value of attribute reference_id.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def reference_id @reference_id end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/sportradar/api/soccer/venue.rb', line 5 def response @response end |