Class: Service
- Inherits:
-
Object
- Object
- Service
- Defined in:
- lib/tacklebox/components/service.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
- #create(serviceData) ⇒ Object
- #delete(service_id) ⇒ Object
- #get(service_id) ⇒ Object
-
#initialize(config) ⇒ Service
constructor
A new instance of Service.
- #list ⇒ Object
Constructor Details
#initialize(config) ⇒ Service
Returns a new instance of Service.
6 7 8 |
# File 'lib/tacklebox/components/service.rb', line 6 def initialize(config) self.api = ServiceApi.new(config) end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
4 5 6 |
# File 'lib/tacklebox/components/service.rb', line 4 def api @api end |
Instance Method Details
#create(serviceData) ⇒ Object
14 15 16 |
# File 'lib/tacklebox/components/service.rb', line 14 def create(serviceData) self.api.create_service(serviceData) end |
#delete(service_id) ⇒ Object
22 23 24 |
# File 'lib/tacklebox/components/service.rb', line 22 def delete(service_id) self.api.delete_service(service_id) end |
#get(service_id) ⇒ Object
18 19 20 |
# File 'lib/tacklebox/components/service.rb', line 18 def get(service_id) self.api.get_service(service_id) end |
#list ⇒ Object
10 11 12 |
# File 'lib/tacklebox/components/service.rb', line 10 def list self.api.list_services() end |