Module: ManageIQClient::Resource::ClassMethods
- Defined in:
- app/models/manage_iq_client/resource.rb
Instance Method Summary collapse
- #client ⇒ Object
- #collection_path ⇒ Object
- #find(id, params = {}) ⇒ Object
- #list(params = {}) ⇒ Object
- #resource_path(id) ⇒ Object
Instance Method Details
#client ⇒ Object
24 25 26 |
# File 'app/models/manage_iq_client/resource.rb', line 24 def client @client ||= ManageIQClient::Base.new end |
#collection_path ⇒ Object
28 29 30 |
# File 'app/models/manage_iq_client/resource.rb', line 28 def collection_path path end |
#find(id, params = {}) ⇒ Object
20 21 22 |
# File 'app/models/manage_iq_client/resource.rb', line 20 def find(id, params = {}) new(client.find resource_path(id), params) end |
#list(params = {}) ⇒ Object
16 17 18 |
# File 'app/models/manage_iq_client/resource.rb', line 16 def list(params = {}) client.find collection_path, params end |
#resource_path(id) ⇒ Object
32 33 34 |
# File 'app/models/manage_iq_client/resource.rb', line 32 def resource_path(id) "#{path}/#{id}" end |