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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#and?, #empty?, #not?, #or?, #scalar?, #steps

Methods included from ConvenientService::Support::Copyable

#copy

Methods included from ConvenientService::Support::Concern

included

Constructor Details

#initialize(expression) ⇒ void

Parameters:



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

def initialize(expression)
  @expression = expression
end

Instance Attribute Details

#expressionObject (readonly)

Returns the value of attribute expression.



14
15
16
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 14

def expression
  @expression
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean)


98
99
100
101
102
103
104
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 98

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::Base



66
67
68
69
70
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 66

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

  self
end

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



56
57
58
59
60
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 56

def each_step(&block)
  expression.each_step(&block)

  self
end

#error?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 48

def error?
  expression.error?
end

#failure?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 41

def failure?
  expression.failure?
end

#group?Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 90

def group?
  true
end

#inspectString

Returns:

  • (String)


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

def inspect
  "(#{expression.inspect})"
end

#resultConvenientService::Service::Plugins::HasJSendResult::Entities::Result



27
28
29
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 27

def result
  expression.result
end

#success?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 34

def success?
  expression.success?
end

#to_argumentsConvenientService::Support::Arguments



109
110
111
# File 'lib/convenient_service/service/plugins/can_have_connected_steps/entities/expressions/group.rb', line 109

def to_arguments
  Support::Arguments.new(expression)
end

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



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

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