Module: SmartCore::ValueObject::Interface::Enumerable::Enumerability Private
- Defined in:
- lib/smart_core/value_object/interface/enumerable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#each(&block) ⇒ Enumerable
rubocop:disable Style/RedundantParentheses.
Instance Method Details
#each(&block) ⇒ Enumerable
rubocop:disable Style/RedundantParentheses
27 28 29 |
# File 'lib/smart_core/value_object/interface/enumerable.rb', line 27 def each(&block) block_given? ? yield(self) : (Enumerator.new { |yielder| yielder.yield(self) }.each) end |