Class: Locomotive::Coal::Resources::CurrentSite

Inherits:
Struct
  • Object
show all
Includes:
Locomotive::Coal::Resources::Concerns::Request
Defined in:
lib/locomotive/coal/resources/current_site.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Locomotive::Coal::Resources::Concerns::Request

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

Instance Attribute Details

#credentialsObject

Returns the value of attribute credentials

Returns:

  • (Object)

    the current value of credentials



4
5
6
# File 'lib/locomotive/coal/resources/current_site.rb', line 4

def credentials
  @credentials
end

#uriObject

Returns the value of attribute uri

Returns:

  • (Object)

    the current value of uri



4
5
6
# File 'lib/locomotive/coal/resources/current_site.rb', line 4

def uri
  @uri
end

Instance Method Details

#destroyObject



17
18
19
20
# File 'lib/locomotive/coal/resources/current_site.rb', line 17

def destroy
  data = delete('current_site')
  Resource.new(data)
end

#get(locale = nil) ⇒ Object



8
9
10
# File 'lib/locomotive/coal/resources/current_site.rb', line 8

def get(locale = nil)
  Resource.new(super('current_site', _locale: locale))
end

#update(attributes = {}) ⇒ Object



12
13
14
15
# File 'lib/locomotive/coal/resources/current_site.rb', line 12

def update(attributes = {})
  data = put('current_site', site: attributes)
  Resource.new(data)
end