Class: Locomotive::Coal::Resources::Pages

Inherits:
Base
  • Object
show all
Defined in:
lib/locomotive/coal/resources/pages.rb

Instance Attribute Summary

Attributes inherited from Base

#credentials, #uri

Instance Method Summary collapse

Methods inherited from Base

#create, #destroy, #destroy_all, #initialize, #update_with_locale

Methods included from Concerns::Request

#delete, #do_request, #get, #post, #put, #without_authentication

Constructor Details

This class inherits a constructor from Locomotive::Coal::Resources::Base

Instance Method Details

#fullpaths(locale) ⇒ Object



14
15
16
17
18
# File 'lib/locomotive/coal/resources/pages.rb', line 14

def fullpaths(locale)
  get("#{resources_name}/fullpaths", _locale: locale).map do |attributes|
    Resource.new(attributes)
  end
end

#index(locale = nil) ⇒ Object Also known as: all



6
7
8
9
10
# File 'lib/locomotive/coal/resources/pages.rb', line 6

def index(locale = nil)
  get(resources_name, _locale: locale).map do |attributes|
    Resource.new(attributes)
  end
end