Class: LocoRb::Resource::BaseResource

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/loco-rb/resource/base_resource.rb

Direct Known Subclasses

Asset, Export, Import, Locale

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource, headers, key = nil) ⇒ BaseResource

Returns a new instance of BaseResource.



5
6
7
8
9
# File 'lib/loco-rb/resource/base_resource.rb', line 5

def initialize(resource, headers, key=nil)
  @key = key
  @headers = headers
  super(resource)
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



4
5
6
# File 'lib/loco-rb/resource/base_resource.rb', line 4

def headers
  @headers
end

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/loco-rb/resource/base_resource.rb', line 4

def key
  @key
end