Class: ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Not Private

Inherits:
Base
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.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.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#and?, #complex_if?, #else?, #empty?, #group?, #if?, #or?, #scalar?, #steps

Methods included from ConvenientService::Support::Copyable

#copy

Methods included from ConvenientService::Support::AbstractMethod

abstract_method

Methods included from ConvenientService::Support::Concern

included

Constructor Details

#initialize(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.



25
26
27
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 25

def initialize(expression)
  @expression = expression
end

Instance Attribute Details

#expressionObject (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.

Since:

  • 1.0.0



19
20
21
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 19

def expression
  @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.

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



110
111
112
113
114
115
116
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 110

def ==(other)
  return unless other.instance_of?(self.class)

  return false if expression != other.expression

  true
end

#each_evaluated_step(&block) ⇒ 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.



78
79
80
81
82
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 78

def each_evaluated_step(&block)
  expression.each_evaluated_step(&block)

  self
end

#each_step(&block) ⇒ 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.



68
69
70
71
72
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 68

def each_step(&block)
  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.

Returns:

  • (Boolean)

Since:

  • 1.0.0



60
61
62
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 60

def error?
  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.

Returns:

  • (Boolean)

Since:

  • 1.0.0



53
54
55
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 53

def failure?
  expression.success?
end

#inspectString

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:

  • (String)

Since:

  • 1.0.0



95
96
97
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 95

def inspect
  "!#{expression.inspect}"
end

#not?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.

Returns:

  • (Boolean)

Since:

  • 1.0.0



102
103
104
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 102

def not?
  true
end

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

Returns:

Since:

  • 1.0.0



39
40
41
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 39

def organizer
  expression.organizer
end

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



32
33
34
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 32

def result
  expression.result.negated_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.

Returns:

  • (Boolean)

Since:

  • 1.0.0



46
47
48
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 46

def success?
  expression.failure?
end

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

Returns:

Since:

  • 1.0.0



121
122
123
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 121

def to_arguments
  Support::Arguments.new(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.



88
89
90
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/not.rb', line 88

def with_organizer(organizer)
  copy(overrides: {args: {0 => expression.with_organizer(organizer)}})
end