Module: Layer::Operations::Fetch::ClassMethods

Included in:
SingletonRelationProxy
Defined in:
lib/layer/operations/fetch.rb

Instance Method Summary collapse

Instance Method Details

#fetch(client = self.client) ⇒ Layer::Resource

Fetches the singular resource

Parameters:

  • client (Layer::Client) (defaults to: self.client)

    the client to use to make this request

Returns:

Raises:



11
12
13
14
# File 'lib/layer/operations/fetch.rb', line 11

def fetch(client = self.client)
  response = client.get(url)
  from_response(response, client)
end