Class: SportsDataApi::Ncaamb::Venue
- Inherits:
-
Object
- Object
- SportsDataApi::Ncaamb::Venue
- Defined in:
- lib/sports_data_api/ncaamb/venue.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#capacity ⇒ Object
readonly
Returns the value of attribute capacity.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#zip ⇒ Object
readonly
Returns the value of attribute zip.
Instance Method Summary collapse
-
#initialize(xml) ⇒ Venue
constructor
A new instance of Venue.
Constructor Details
#initialize(xml) ⇒ Venue
Returns a new instance of Venue.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 5 def initialize(xml) xml = xml.first if xml.is_a? Nokogiri::XML::NodeSet if xml.is_a? Nokogiri::XML::Element @id = xml['id'] @name = xml['name'] @address = xml['address'] @city = xml['city'] @state = xml['state'] @zip = xml['zip'] @country = xml['country'] @capacity = xml['capacity'] end end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
4 5 6 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4 def address @address end |
#capacity ⇒ Object (readonly)
Returns the value of attribute capacity.
4 5 6 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4 def capacity @capacity end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
4 5 6 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
4 5 6 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4 def country @country end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
4 5 6 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4 def state @state end |
#zip ⇒ Object (readonly)
Returns the value of attribute zip.
4 5 6 |
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4 def zip @zip end |