Class: ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Entities::StepAwareEnumerables::Base

Inherits:
Object
  • Object
show all
Includes:
ConvenientService::Support::AbstractMethod
Defined in:
lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb

Direct Known Subclasses

Enumerable, Object

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ConvenientService::Support::AbstractMethod

abstract_method

Constructor Details

#initialize(object:, organizer:, propagated_result:, modifiers: []) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:



72
73
74
75
76
77
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb', line 72

def initialize(object:, organizer:, propagated_result:, modifiers: [])
  @object = object
  @organizer = organizer
  @propagated_result = propagated_result
  @modifiers = modifiers
end

Instance Attribute Details

#modifiersArray<Object>

Returns:



47
48
49
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb', line 47

def modifiers
  @modifiers
end

#objectObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



23
24
25
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb', line 23

def object
  @object
end

#organizerObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb', line 31

def organizer
  @organizer
end

#propagated_resultConvenientService::Service::Plugins::HasJSendResult::Entities::Result?



39
40
41
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb', line 39

def propagated_result
  @propagated_result
end

Instance Method Details

#default_data_keySymbol?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Symbol, nil)


54
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb', line 54

abstract_method :default_data_key

#evaluate_bySymbol, ...

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Symbol, String, Proc, nil)


61
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb', line 61

abstract_method :evaluate_by

#result(data_key: default_data_key, evaluate_by: default_evaluate_by) ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result

Parameters:

  • data_key (Symbol, nil) (defaults to: default_data_key)
  • evaluate_by (String, Symbol, Proc) (defaults to: default_evaluate_by)

Returns:



84
85
86
87
88
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/base.rb', line 84

def result(data_key: default_data_key, evaluate_by: default_evaluate_by)
  with_propagated_result_returning(evaluate_by) do |values|
    data_key ? success(data_key => values) : success
  end
end