Module: Rubyzen::Providers::BlocksProvider
- Included in:
- Declarations::ClassDeclaration, Declarations::FileDeclaration, Declarations::MethodDeclaration
- Defined in:
- lib/rubyzen/providers/blocks_provider.rb
Overview
Provides access to block expressions (do..end / ..) within a declaration.
Instance Method Summary collapse
-
#blocks ⇒ Rubyzen::Collections::BlocksCollection
Collection of block declarations.
Instance Method Details
#blocks ⇒ Rubyzen::Collections::BlocksCollection
Returns collection of block declarations.
6 7 8 9 10 11 12 |
# File 'lib/rubyzen/providers/blocks_provider.rb', line 6 def blocks Collections::BlocksCollection.new( node.each_descendant(:block).map do |block_node| Declarations::BlockDeclaration.new(block_node, self) end ) end |