Class: ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Not
- Inherits:
-
Base
- Object
- Base
- ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Not
show all
- Defined in:
- lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Base
#and?, #empty?, #group?, #or?, #scalar?, #steps
#copy
included
Constructor Details
#initialize(expression) ⇒ void
20
21
22
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 20
def initialize(expression)
@expression = expression
end
|
Instance Attribute Details
#expression ⇒ Object
Returns the value of attribute expression.
14
15
16
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 14
def expression
@expression
end
|
Instance Method Details
#==(other) ⇒ Boolean
98
99
100
101
102
103
104
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 98
def ==(other)
return unless other.instance_of?(self.class)
return false if expression != other.expression
true
end
|
66
67
68
69
70
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 66
def each_evaluated_step(&block)
expression.each_evaluated_step(&block)
self
end
|
56
57
58
59
60
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 56
def each_step(&block)
expression.each_step(&block)
self
end
|
#error? ⇒ Boolean
48
49
50
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 48
def error?
expression.error?
end
|
#failure? ⇒ Boolean
41
42
43
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 41
def failure?
expression.success?
end
|
#inspect ⇒ String
83
84
85
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 83
def inspect
"!#{expression.inspect}"
end
|
#not? ⇒ Boolean
90
91
92
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 90
def not?
true
end
|
27
28
29
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 27
def result
expression.result.negated_result
end
|
#success? ⇒ Boolean
34
35
36
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 34
def success?
expression.failure?
end
|
109
110
111
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 109
def to_arguments
Support::Arguments.new(expression)
end
|
76
77
78
|
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 76
def with_organizer(organizer)
copy(overrides: {args: {0 => expression.with_organizer(organizer)}})
end
|