Exception: ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Exceptions::ObjectIsNotEnumerable

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/can_have_step_aware_enumerables/exceptions.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(object:) ⇒ void

This method returns an undefined value.

Parameters:

  • object (Object)

    Can be any type.



18
19
20
21
22
23
24
25
26
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/exceptions.rb', line 18

def initialize_with_kwargs(object:)
  message = <<~TEXT
    Object of class `#{Utils::Class.display_name(object.class)}` is NOT enumerable.

    Valid enumerable examples are classes that mix in `Enumerable` module like `Array`, `Hash`, `Set`, `Range`, `IO`, `Enumerator`, etc.
  TEXT

  initialize(message)
end