Class: ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Empty

Inherits:
Base
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb

Instance Method Summary collapse

Methods inherited from Base

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

Methods included from ConvenientService::Support::Copyable

#copy

Methods included from ConvenientService::Support::AbstractMethod

abstract_method

Constructor Details

#initializevoid



18
19
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb', line 18

def initialize
end

Instance Method Details

#==(other) ⇒ Boolean?

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)


91
92
93
94
95
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb', line 91

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

  true
end

#each_evaluated_step(&block) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Base



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

def each_evaluated_step(&block)
  self
end

#each_step(&block) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Base



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

def each_step(&block)
  self
end

#empty?Boolean

Returns:

  • (Boolean)


83
84
85
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb', line 83

def empty?
  true
end

#error?Boolean



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

def error?
  ::ConvenientService.raise Exceptions::EmptyExpressionHasNoStatus.new
end

#failure?Boolean



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

def failure?
  ::ConvenientService.raise Exceptions::EmptyExpressionHasNoStatus.new
end

#inspectString

Returns:

  • (String)


76
77
78
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb', line 76

def inspect
  ""
end

#resultObject



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

def result
  ::ConvenientService.raise Exceptions::EmptyExpressionHasNoResult.new
end

#success?Boolean



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

def success?
  ::ConvenientService.raise Exceptions::EmptyExpressionHasNoStatus.new
end

#to_argumentsConvenientService::Support::Arguments



100
101
102
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/empty.rb', line 100

def to_arguments
  Support::Arguments.new
end

#with_organizer(organizer) ⇒ ConvenientService::Service::Plugins::CanHaveConnectedSteps::Entities::Expressions::Empty



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

def with_organizer(organizer)
  self
end