Class: AriFetch::Vehicle
- Inherits:
-
Object
- Object
- AriFetch::Vehicle
- Defined in:
- lib/ari_fetch/vehicle.rb
Instance Attribute Summary collapse
-
#vehicle ⇒ Object
Returns the value of attribute vehicle.
Instance Method Summary collapse
- #available? ⇒ Boolean
-
#initialize(vehicle) ⇒ Vehicle
constructor
A new instance of Vehicle.
- #result ⇒ Object
Constructor Details
#initialize(vehicle) ⇒ Vehicle
Returns a new instance of Vehicle.
7 8 9 |
# File 'lib/ari_fetch/vehicle.rb', line 7 def initialize(vehicle) @vehicle = vehicle end |
Instance Attribute Details
#vehicle ⇒ Object
Returns the value of attribute vehicle.
5 6 7 |
# File 'lib/ari_fetch/vehicle.rb', line 5 def vehicle @vehicle end |
Instance Method Details
#available? ⇒ Boolean
15 16 17 |
# File 'lib/ari_fetch/vehicle.rb', line 15 def available? ari_action == "AVAILABLE" end |
#result ⇒ Object
11 12 13 |
# File 'lib/ari_fetch/vehicle.rb', line 11 def result OpenStruct.new(vehicle_data_with_downcased_keys) end |