Class: ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Commands::CastStepAwareEnumerable
- Inherits:
-
ConvenientService::Support::Command
- Object
- ConvenientService::Support::Command
- ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Commands::CastStepAwareEnumerable
- Defined in:
- lib/convenient_service/service/plugins/can_have_step_aware_enumerables/commands/cast_step_aware_enumerable.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#organizer ⇒ Object
readonly
Returns the value of attribute organizer.
-
#propagated_result ⇒ Object
readonly
Returns the value of attribute propagated_result.
Instance Method Summary collapse
- #call ⇒ ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Entities::StepAwareEnumerables::Base
- #initialize(object:, organizer:, propagated_result: nil) ⇒ void constructor
Methods inherited from ConvenientService::Support::Command
Constructor Details
#initialize(object:, organizer:, propagated_result: nil) ⇒ void
38 39 40 41 42 |
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/commands/cast_step_aware_enumerable.rb', line 38 def initialize(object:, organizer:, propagated_result: nil) @object = object @organizer = organizer @propagated_result = propagated_result end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
18 19 20 |
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/commands/cast_step_aware_enumerable.rb', line 18 def object @object end |
#organizer ⇒ Object (readonly)
Returns the value of attribute organizer.
24 25 26 |
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/commands/cast_step_aware_enumerable.rb', line 24 def organizer @organizer end |
#propagated_result ⇒ Object (readonly)
Returns the value of attribute propagated_result.
30 31 32 |
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/commands/cast_step_aware_enumerable.rb', line 30 def propagated_result @propagated_result end |
Instance Method Details
#call ⇒ ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Entities::StepAwareEnumerables::Base
48 49 50 51 52 |
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/commands/cast_step_aware_enumerable.rb', line 48 def call raise ::ConvenientService.raise Exceptions::ObjectIsNotEnumerable.new(object: object) unless object.is_a?(::Enumerable) Entities::StepAwareEnumerables::Enumerable.new(object: object, organizer: organizer, propagated_result: propagated_result) end |