Class: OffTheGridTrucks::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/off_the_grid_trucks/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Location

Returns a new instance of Location.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/off_the_grid_trucks/location.rb', line 7

def initialize(args)
  @id = args.fetch('id') {}
  @name = args.fetch('name') {}
  @secondary_name = args.fetch('secondaryName') {}
  @location_type = args.fetch('locationType') {}
  @region = args.fetch('region') {}
  @event_feed_id = args.fetch('eventFeeId') {}
  @pricing_structure_id = args.fetch('pricingStructureId') {}
  @address1 = args.fetch('address1') {}
  @address2 = args.fetch('address2') {}
  @city = args.fetch('city') {}
  @state = args.fetch('state') {}
  @zipcode = args.fetch('zipcode') {}
  @latitude = args.fetch('latitude') {}
  @longitude = args.fetch('longitude') {}
end

Instance Attribute Details

#address1Object (readonly)

Returns the value of attribute address1.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def address1
  @address1
end

#address2Object (readonly)

Returns the value of attribute address2.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def address2
  @address2
end

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def city
  @city
end

#event_feed_idObject (readonly)

Returns the value of attribute event_feed_id.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def event_feed_id
  @event_feed_id
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def id
  @id
end

#latitudeObject (readonly)

Returns the value of attribute latitude.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def latitude
  @latitude
end

#location_typeObject (readonly)

Returns the value of attribute location_type.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def location_type
  @location_type
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def longitude
  @longitude
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def name
  @name
end

#pricing_structure_idObject (readonly)

Returns the value of attribute pricing_structure_id.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def pricing_structure_id
  @pricing_structure_id
end

#regionObject (readonly)

Returns the value of attribute region.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def region
  @region
end

#secondary_nameObject (readonly)

Returns the value of attribute secondary_name.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def secondary_name
  @secondary_name
end

#stateObject (readonly)

Returns the value of attribute state.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def state
  @state
end

#zipcodeObject (readonly)

Returns the value of attribute zipcode.



3
4
5
# File 'lib/off_the_grid_trucks/location.rb', line 3

def zipcode
  @zipcode
end