Class: Arrest::NestedResource

Inherits:
Object
  • Object
show all
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

Attributes included from HasAttributes

#attribute_values

Instance Method Summary collapse

Methods included from BelongsTo

included

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

#contextObject (readonly)

Returns the value of attribute context.



9
10
11
# File 'lib/arrest/nested_resource.rb', line 9

def context
  @context
end