Class: Arrest::NestedResource
- Inherits:
-
Object
- Object
- Arrest::NestedResource
- Includes:
- BelongsTo, HasAttributes
- Defined in:
- lib/arrest/nested_resource.rb
Overview
A nested resource has no own url It is an embedded entity in an actual RestResource or an other NestedResource
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Attributes included from HasAttributes
Instance Method Summary collapse
-
#initialize(context, h) ⇒ NestedResource
constructor
A new instance of NestedResource.
Methods included from BelongsTo
Methods included from HasAttributes
#attributes, #attributes=, included, #init_from_hash, #initialize_has_attributes, #load_from_stub, #render_field_to_hash?, #reset_dirtiness, #stubbed?, #to_hash, #to_jhash, #update_attributes
Constructor Details
#initialize(context, h) ⇒ NestedResource
Returns a new instance of NestedResource.
11 12 13 14 |
# File 'lib/arrest/nested_resource.rb', line 11 def initialize context, h @context = context init_from_hash h end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
9 10 11 |
# File 'lib/arrest/nested_resource.rb', line 9 def context @context end |