Module: Ribose::Actions::Fetch::ClassMethods

Defined in:
lib/ribose/actions/fetch.rb

Instance Method Summary collapse

Instance Method Details

#fetch(resource_id, options = {}) ⇒ Sawyer::Resource

Fetch A Resource

This exposes the ‘#fetch` instance method as class methods. Once this methods is invoked then it will create an instnace with all of the provided attributes & then invoke the `fetch` action on it

Parameters:

  • resource_id (String)

    The specific resource Id

Returns:

  • (Sawyer::Resource)


38
39
40
# File 'lib/ribose/actions/fetch.rb', line 38

def fetch(resource_id, options = {})
  new(options.merge(resource_id: resource_id)).fetch
end