Class: XDry::ChildScope
- Defined in:
- lib/xdry/parsing/scopes_support.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#parent_scope ⇒ Object
readonly
Returns the value of attribute parent_scope.
-
#start_node ⇒ Object
readonly
Returns the value of attribute start_node.
Attributes inherited from Scope
Instance Method Summary collapse
-
#initialize(parent_scope, start_node) ⇒ ChildScope
constructor
A new instance of ChildScope.
- #parent_scopes ⇒ Object
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_scope ⇒ Object (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_node ⇒ Object (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_scopes ⇒ Object
137 138 139 |
# File 'lib/xdry/parsing/scopes_support.rb', line 137 def parent_scopes parent_scope.all_scopes end |