Class: Locomotive::Coal::Resources::Snippets

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

Instance Attribute Summary

Attributes inherited from Base

#credentials, #uri

Instance Method Summary collapse

Methods inherited from Base

#create, #destroy, #destroy_all, #initialize, #update, #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

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



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

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