Refresh

This website rubydoc.info/gems/paperlex/Paperlex/RootObject/ClassMethods is currently offline. Cloudflare's Always Online™ shows a snapshot of this web page from the Internet Archive's Wayback Machine. To check for the live version, click Refresh.

Module: Paperlex::RootObject::ClassMethods

Defined in:
lib/paperlex/base/root_object.rb

Instance Method Summary collapse

Instance Method Details

#allObject



14
15
16
# File 'lib/paperlex/base/root_object.rb', line 14

def all
  get(collection_url).map {|attrs| new(attrs) }
end

#collection_urlObject



6
7
8
# File 'lib/paperlex/base/root_object.rb', line 6

def collection_url
  "#{url_name}.json"
end

#find(uuid) ⇒ Object



18
19
20
# File 'lib/paperlex/base/root_object.rb', line 18

def find(uuid)
  new(get(url_for(uuid)))
end

#url_for(uuid) ⇒ Object



10
11
12
# File 'lib/paperlex/base/root_object.rb', line 10

def url_for(uuid)
  "#{url_name}/#{uuid}.json"
end