Module: Rubyzen::Providers::ConstantsProvider
- Included in:
- Declarations::ClassDeclaration, Declarations::FileDeclaration, Declarations::MethodDeclaration, Declarations::ModuleDeclaration
- Defined in:
- lib/rubyzen/providers/constants_provider.rb
Overview
Provides access to constant references and assignments within a declaration.
Instance Method Summary collapse
-
#constants ⇒ Rubyzen::Collections::ConstantsCollection
Collection of constant declarations.
Instance Method Details
#constants ⇒ Rubyzen::Collections::ConstantsCollection
Returns collection of constant declarations.
6 7 8 9 10 11 12 13 14 |
# File 'lib/rubyzen/providers/constants_provider.rb', line 6 def constants constant_nodes = node.each_descendant(:casgn, :const) Collections::ConstantsCollection.new( constant_nodes.map do |const_node| Declarations::ConstantDeclaration.new(const_node, self) end ) end |