Module: ManageIQClient::Resource::ClassMethods

Defined in:
app/models/manage_iq_client/resource.rb

Instance Method Summary collapse

Instance Method Details

#clientObject



24
25
26
# File 'app/models/manage_iq_client/resource.rb', line 24

def client
  @client ||= ManageIQClient::Base.new
end

#collection_pathObject



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