Class: ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::If Private
- Inherits:
-
Base
- Object
- Base
- ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::If
- Defined in:
- lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #condition_expression ⇒ Object readonly private
- #then_expression ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Boolean? private
- #each_evaluated_step(&block) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Base private
- #each_step(&block) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Base private
- #error? ⇒ Boolean private
- #failure? ⇒ Boolean private
- #if? ⇒ Boolean private
- #initialize(condition_expression, then_expression) ⇒ void constructor private
- #inspect ⇒ String private
- #organizer ⇒ ConvenientService::Service private
- #result ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result private
- #success? ⇒ Boolean private
- #to_arguments ⇒ ConvenientService::Support::Arguments private
- #with_organizer(organizer) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Not private
Methods inherited from Base
#and?, #complex_if?, #else?, #empty?, #group?, #not?, #or?, #scalar?, #steps
Methods included from ConvenientService::Support::Copyable
Methods included from ConvenientService::Support::AbstractMethod
Methods included from ConvenientService::Support::Concern
Constructor Details
#initialize(condition_expression, then_expression) ⇒ 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.
32 33 34 35 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 32 def initialize(condition_expression, then_expression) @condition_expression = condition_expression @then_expression = then_expression end |
Instance Attribute Details
#condition_expression ⇒ Object (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.
19 20 21 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 19 def condition_expression @condition_expression end |
#then_expression ⇒ Object (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.
25 26 27 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 25 def then_expression @then_expression end |
Instance Method Details
#==(other) ⇒ Boolean?
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.
128 129 130 131 132 133 134 135 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 128 def ==(other) return unless other.instance_of?(self.class) return false if condition_expression != other.condition_expression return false if then_expression != other.then_expression true end |
#each_evaluated_step(&block) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Base
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.
94 95 96 97 98 99 100 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 94 def each_evaluated_step(&block) condition_expression.each_evaluated_step(&block) then_expression.each_evaluated_step(&block) if condition_expression.success? self end |
#each_step(&block) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Base
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.
82 83 84 85 86 87 88 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 82 def each_step(&block) condition_expression.each_step(&block) then_expression.each_step(&block) self end |
#error? ⇒ Boolean
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.
71 72 73 74 75 76 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 71 def error? return false if condition_expression.failure? return true if condition_expression.error? then_expression.error? end |
#failure? ⇒ Boolean
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.
61 62 63 64 65 66 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 61 def failure? return true if condition_expression.failure? return false if condition_expression.error? then_expression.failure? end |
#if? ⇒ Boolean
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.
120 121 122 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 120 def if? true end |
#inspect ⇒ String
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.
113 114 115 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 113 def inspect "if #{condition_expression.inspect} then #{then_expression.inspect} end" end |
#organizer ⇒ ConvenientService::Service
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.
47 48 49 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 47 def organizer condition_expression.organizer end |
#result ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result
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.
40 41 42 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 40 def result condition_expression.success? ? then_expression.result : condition_expression.result end |
#success? ⇒ Boolean
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.
54 55 56 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 54 def success? condition_expression.success? && then_expression.success? end |
#to_arguments ⇒ ConvenientService::Support::Arguments
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.
140 141 142 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 140 def to_arguments Support::Arguments.new(condition_expression, then_expression) end |
#with_organizer(organizer) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Not
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.
106 107 108 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/if.rb', line 106 def with_organizer(organizer) copy(overrides: {args: {0 => condition_expression.with_organizer(organizer), 1 => then_expression.with_organizer(organizer)}}) end |