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.

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#each(&block) ⇒ Enumerable

rubocop:disable Style/RedundantParentheses

Parameters:

  • block (Block)

Returns:

Since:

  • 0.1.0



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