Sha256: 1b52bb161191327ae4e71775b65285e7900560e0e31950632b8d94049546e64c

Contents?: true

Size: 557 Bytes

Versions: 15

Compression:

Stored size: 557 Bytes

Contents

module SportsDataApi
  module Nba
    class Venue
      attr_reader :id, :name, :address, :city, :state, :zip, :country, :capacity
      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
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sports_data_api-0.11.6 lib/sports_data_api/nba/venue.rb
sports_data_api-0.11.5 lib/sports_data_api/nba/venue.rb
sports_data_api-0.11.3 lib/sports_data_api/nba/venue.rb
sports_data_api-0.11.2 lib/sports_data_api/nba/venue.rb
sports_data_api-0.11.1 lib/sports_data_api/nba/venue.rb
sports_data_api-0.11.0 lib/sports_data_api/nba/venue.rb
sports_data_api-0.10.1 lib/sports_data_api/nba/venue.rb
sports_data_api-0.10.0 lib/sports_data_api/nba/venue.rb
sports_data_api-0.9.2 lib/sports_data_api/nba/venue.rb
sports_data_api-0.2.4 lib/sports_data_api/nba/venue.rb
sports_data_api-0.2.3 lib/sports_data_api/nba/venue.rb
sports_data_api-0.2.2 lib/sports_data_api/nba/venue.rb
sports_data_api-0.2.1 lib/sports_data_api/nba/venue.rb
sports_data_api-0.2.0 lib/sports_data_api/nba/venue.rb
sports_data_api-0.1.0 lib/sports_data_api/nba/venue.rb