Class: ViewModel::SerializeContext::SharedContext

Inherits:
TraversalContext::SharedContext show all
Defined in:
lib/view_model/serialize_context.rb

Instance Attribute Summary collapse

Attributes inherited from TraversalContext::SharedContext

#access_control, #callbacks

Instance Method Summary collapse

Constructor Details

#initialize(flatten_references: false, **rest) ⇒ SharedContext

Returns a new instance of SharedContext.



10
11
12
13
14
# File 'lib/view_model/serialize_context.rb', line 10

def initialize(flatten_references: false, **rest)
  super(**rest)
  @references         = ViewModel::References.new
  @flatten_references = flatten_references
end

Instance Attribute Details

#flatten_referencesObject (readonly)

Returns the value of attribute flatten_references.



8
9
10
# File 'lib/view_model/serialize_context.rb', line 8

def flatten_references
  @flatten_references
end

#referencesObject (readonly)

Returns the value of attribute references.



8
9
10
# File 'lib/view_model/serialize_context.rb', line 8

def references
  @references
end