Module: Duby::AST::ClassScoped

Included in:
Field, FieldAssignment, FieldDeclaration
Defined in:
lib/duby/ast.rb

Instance Method Summary collapse

Instance Method Details

#scopeObject



140
141
142
143
144
145
146
# File 'lib/duby/ast.rb', line 140

def scope
  @scope ||= begin
    scope = parent
    scope = scope.parent until scope.nil? || ClassDefinition === scope
    scope
  end
end