Class: OffTheGridTrucks::Location
- Inherits:
-
Object
- Object
- OffTheGridTrucks::Location
- Defined in:
- lib/off_the_grid_trucks/location.rb
Instance Attribute Summary collapse
-
#address1 ⇒ Object
readonly
Returns the value of attribute address1.
-
#address2 ⇒ Object
readonly
Returns the value of attribute address2.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#event_feed_id ⇒ Object
readonly
Returns the value of attribute event_feed_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#location_type ⇒ Object
readonly
Returns the value of attribute location_type.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pricing_structure_id ⇒ Object
readonly
Returns the value of attribute pricing_structure_id.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#secondary_name ⇒ Object
readonly
Returns the value of attribute secondary_name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#zipcode ⇒ Object
readonly
Returns the value of attribute zipcode.
Instance Method Summary collapse
-
#initialize(args) ⇒ Location
constructor
A new instance of Location.
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
#address1 ⇒ Object (readonly)
Returns the value of attribute address1.
3 4 5 |
# File 'lib/off_the_grid_trucks/location.rb', line 3 def address1 @address1 end |
#address2 ⇒ Object (readonly)
Returns the value of attribute address2.
3 4 5 |
# File 'lib/off_the_grid_trucks/location.rb', line 3 def address2 @address2 end |
#city ⇒ Object (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_id ⇒ Object (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 |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/off_the_grid_trucks/location.rb', line 3 def id @id end |
#latitude ⇒ Object (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_type ⇒ Object (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 |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
3 4 5 |
# File 'lib/off_the_grid_trucks/location.rb', line 3 def longitude @longitude end |
#name ⇒ Object (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_id ⇒ Object (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 |
#region ⇒ Object (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_name ⇒ Object (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 |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/off_the_grid_trucks/location.rb', line 3 def state @state end |
#zipcode ⇒ Object (readonly)
Returns the value of attribute zipcode.
3 4 5 |
# File 'lib/off_the_grid_trucks/location.rb', line 3 def zipcode @zipcode end |