Class: OffTheGridTrucks::Service
- Inherits:
-
Object
- Object
- OffTheGridTrucks::Service
- Defined in:
- lib/off_the_grid_trucks/service.rb
Instance Attribute Summary collapse
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#service_type ⇒ Object
readonly
Returns the value of attribute service_type.
-
#vendor ⇒ Object
readonly
Returns the value of attribute vendor.
Instance Method Summary collapse
-
#initialize(args) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(args) ⇒ Service
Returns a new instance of Service.
7 8 9 10 11 12 |
# File 'lib/off_the_grid_trucks/service.rb', line 7 def initialize(args) @name = args.fetch('name') {} @vendor = Vendor.new(args.fetch('vendor') {}) @service_type = args.fetch('serviceType') {} @categories = args.fetch('categories') {} end |
Instance Attribute Details
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
5 6 7 |
# File 'lib/off_the_grid_trucks/service.rb', line 5 def categories @categories end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/off_the_grid_trucks/service.rb', line 5 def name @name end |
#service_type ⇒ Object (readonly)
Returns the value of attribute service_type.
5 6 7 |
# File 'lib/off_the_grid_trucks/service.rb', line 5 def service_type @service_type end |
#vendor ⇒ Object (readonly)
Returns the value of attribute vendor.
5 6 7 |
# File 'lib/off_the_grid_trucks/service.rb', line 5 def vendor @vendor end |