Class: SportsDataApi::Ncaamb::Venue

Inherits:
Object
  • Object
show all
Defined in:
lib/sports_data_api/ncaamb/venue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ 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

#addressObject (readonly)

Returns the value of attribute address.



4
5
6
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4

def address
  @address
end

#capacityObject (readonly)

Returns the value of attribute capacity.



4
5
6
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4

def capacity
  @capacity
end

#cityObject (readonly)

Returns the value of attribute city.



4
5
6
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



4
5
6
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4

def country
  @country
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4

def name
  @name
end

#stateObject (readonly)

Returns the value of attribute state.



4
5
6
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4

def state
  @state
end

#zipObject (readonly)

Returns the value of attribute zip.



4
5
6
# File 'lib/sports_data_api/ncaamb/venue.rb', line 4

def zip
  @zip
end