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

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/boolean.rb

Instance Attribute Summary

Attributes inherited from Base

#modifiers, #object, #organizer, #propagated_result

Instance Method Summary collapse

Methods inherited from Base

#evaluate_by, #initialize

Methods included from ConvenientService::Support::AbstractMethod

abstract_method

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Entities::StepAwareEnumerables::Object

Instance Method Details

#default_data_keynil

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:

  • (nil)


20
21
22
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/boolean.rb', line 20

def default_data_key
  nil
end

#default_evaluate_bynil

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:

  • (nil)


29
30
31
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/boolean.rb', line 29

def default_evaluate_by
  nil
end

#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:



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

def result(data_key: default_data_key, evaluate_by: default_evaluate_by)
  with_propagated_result_returning(evaluate_by) do |boolean|
    boolean ? success : failure
  end
end