Class: ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::And Private
- Inherits:
-
Base
- Object
- Base
- ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::And
- Defined in:
- lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.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
- #and? ⇒ 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
- #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
#complex_if?, #else?, #empty?, #group?, #if?, #not?, #or?, #scalar?, #steps
Methods included from ConvenientService::Support::Copyable
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/and.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/and.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/and.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.
127 128 129 130 131 132 133 134 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 127 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 |
#and? ⇒ 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.
119 120 121 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 119 def and? 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.
93 94 95 96 97 98 99 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 93 def each_evaluated_step(&block) left_expression.each_evaluated_step(&block) right_expression.each_evaluated_step(&block) if left_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 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 82 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.
71 72 73 74 75 76 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 71 def error? return false if left_expression.failure? 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.
61 62 63 64 65 66 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 61 def failure? return true if left_expression.failure? 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.
112 113 114 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 112 def inspect "#{left_expression.inspect} && #{right_expression.inspect}" 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/and.rb', line 47 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 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 40 def result left_expression.success? ? right_expression.result : left_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/and.rb', line 54 def success? left_expression.success? && 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.
139 140 141 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 139 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.
105 106 107 |
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/and.rb', line 105 def with_organizer(organizer) copy(overrides: {args: {0 => left_expression.with_organizer(organizer), 1 => right_expression.with_organizer(organizer)}}) end |