Class: Rubyzen::Collections::ReturnsCollection

Inherits:
BaseCollection show all
Includes:
Providers::CollectionFilterProvider
Defined in:
lib/rubyzen/collections/returns_collection.rb

Overview

Collection of Declarations::ReturnDeclaration — the points at which a method or block yields a value.

Examples:

method.returns.expressions.hash_literals

Instance Method Summary collapse

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

#filter

Instance Method Details

#expressionsExpressionsCollection

The value expressions of every return. Bare returns (which have no value) are omitted.



15
16
17
# File 'lib/rubyzen/collections/returns_collection.rb', line 15

def expressions
  ExpressionsCollection.new(filter_map(&:expression))
end