Class: LocoRb::Resource::BaseResource
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- LocoRb::Resource::BaseResource
- Defined in:
- lib/loco-rb/resource/base_resource.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(resource, headers, key = nil) ⇒ BaseResource
constructor
A new instance of BaseResource.
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
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
4 5 6 |
# File 'lib/loco-rb/resource/base_resource.rb', line 4 def headers @headers end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/loco-rb/resource/base_resource.rb', line 4 def key @key end |