Class: ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Or Private
- Inherits:
-
Base
- Object
- Base
- ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Or
- Defined in:
- lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.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
- #left_expression ⇒ Object readonly private
- #right_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
- #initialize(left_expression, right_expression) ⇒ void constructor private
- #inspect ⇒ String private
- #or? ⇒ Boolean 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?, #if?, #not?, #scalar?, #steps
Methods included from ConvenientService::Support::Copyable
Methods included from ConvenientService::Support::AbstractMethod
Methods included from ConvenientService::Support::Concern
Constructor Details
#initialize(left_expression, right_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/or.rb', line 32 def initialize(left_expression, right_expression) @left_expression = left_expression @right_expression = right_expression end |
Instance Attribute Details
#left_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/or.rb', line 19 def left_expression @left_expression end |
#right_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/or.rb', line 25 def right_expression @right_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.
142 143 144 145 146 147 148 149 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 142 def ==(other) return unless other.instance_of?(self.class) return false if left_expression != other.left_expression return false if right_expression != other.right_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.
105 106 107 108 109 110 111 112 113 114 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 105 def each_evaluated_step(&block) left_expression.each_evaluated_step(&block) return self if left_expression.success? return self if left_expression.error? right_expression.each_evaluated_step(&block) 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.
94 95 96 97 98 99 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 94 def each_step(&block) left_expression.each_step(&block) right_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.
83 84 85 86 87 88 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 83 def error? return false if left_expression.success? return true if left_expression.error? right_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.
73 74 75 76 77 78 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 73 def failure? return false if left_expression.success? return false if left_expression.error? right_expression.failure? 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.
127 128 129 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 127 def inspect "#{left_expression.inspect} || #{right_expression.inspect}" end |
#or? ⇒ 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.
134 135 136 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 134 def or? true 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.
50 51 52 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 50 def organizer left_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 43 44 45 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 40 def result return left_expression.result if left_expression.success? return left_expression.result if left_expression.error? right_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.
60 61 62 63 64 65 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 60 def success? return true if left_expression.success? return false if left_expression.error? right_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.
154 155 156 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 154 def to_arguments Support::Arguments.new(left_expression, right_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.
120 121 122 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/or.rb', line 120 def with_organizer(organizer) copy(overrides: {args: {0 => left_expression.with_organizer(organizer), 1 => right_expression.with_organizer(organizer)}}) end |