Class: XDry::ChildScope

Inherits:
Scope
  • Object
show all
Defined in:
lib/xdry/parsing/scopes_support.rb

Instance Attribute Summary collapse

Attributes inherited from Scope

#children, #model

Instance Method Summary collapse

Methods inherited from Scope

#<<, #all_scopes, #assert_bound!, #bind, child_action_table, #child_added, child_collections, child_subscope_table, #ends_after?, on, parse_using, #parser, stop_children, #subscope_for, #to_s

Constructor Details

#initialize(parent_scope, start_node) ⇒ ChildScope

Returns a new instance of ChildScope.



131
132
133
134
135
# File 'lib/xdry/parsing/scopes_support.rb', line 131

def initialize parent_scope, start_node
  super()
  @parent_scope = parent_scope
  @start_node = start_node
end

Instance Attribute Details

#parent_scopeObject (readonly)

Returns the value of attribute parent_scope.



129
130
131
# File 'lib/xdry/parsing/scopes_support.rb', line 129

def parent_scope
  @parent_scope
end

#start_nodeObject (readonly)

Returns the value of attribute start_node.



128
129
130
# File 'lib/xdry/parsing/scopes_support.rb', line 128

def start_node
  @start_node
end

Instance Method Details

#parent_scopesObject



137
138
139
# File 'lib/xdry/parsing/scopes_support.rb', line 137

def parent_scopes
  parent_scope.all_scopes
end