Class: OffTheGridTrucks::Service

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#categoriesObject (readonly)

Returns the value of attribute categories.



5
6
7
# File 'lib/off_the_grid_trucks/service.rb', line 5

def categories
  @categories
end

#nameObject (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_typeObject (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

#vendorObject (readonly)

Returns the value of attribute vendor.



5
6
7
# File 'lib/off_the_grid_trucks/service.rb', line 5

def vendor
  @vendor
end