Class: Rubyzen::Collections::ExpressionsCollection
- Inherits:
-
BaseCollection
- Object
- Array
- BaseCollection
- Rubyzen::Collections::ExpressionsCollection
- Includes:
- Providers::CollectionFilterProvider
- Defined in:
- lib/rubyzen/collections/expressions_collection.rb
Overview
Collection of Declarations::ExpressionDeclaration — return values, call arguments, and other value-expressions.
Direct Known Subclasses
Instance Method Summary collapse
-
#constants ⇒ ExpressionsCollection
Filters to only constant expressions, including constructors of a constant (e.g. both
Repos::FooandRepos::Foo.new). -
#hash_literals ⇒ ExpressionsCollection
Filters to only braced Hash-literal expressions.
Methods included from Providers::CollectionFilterProvider
#with_name, #with_name_ending_with, #with_name_including, #with_name_starting_with, #without_name, #without_name_ending_with, #without_name_including, #without_name_starting_with
Methods inherited from BaseCollection
Instance Method Details
#constants ⇒ ExpressionsCollection
Filters to only constant expressions, including constructors of a constant (e.g. both Repos::Foo and Repos::Foo.new).
22 23 24 |
# File 'lib/rubyzen/collections/expressions_collection.rb', line 22 def constants filter(&:constant_name) end |
#hash_literals ⇒ ExpressionsCollection
Filters to only braced Hash-literal expressions.
14 15 16 |
# File 'lib/rubyzen/collections/expressions_collection.rb', line 14 def hash_literals filter(&:hash_literal?) end |