Module: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Concern::InstanceMethods Private

Includes:
ConvenientService::Support::Delegate
Defined in:
lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb

Overview

This module is part of a private API. You should avoid using this module 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 included from ConvenientService::Support::Delegate::ClassMethodsForForwardable

#delegate

Methods included from ConvenientService::Support::Concern

included

Instance Attribute Details

#callerObject (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



34
35
36
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 34

def caller
  @caller
end

#directionObject (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



40
41
42
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 40

def direction
  @direction
end

#keyObject (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



22
23
24
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 22

def key
  @key
end

#nameObject (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



28
29
30
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 28

def name
  @name
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 object.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



126
127
128
129
130
131
132
133
134
135
136
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 126

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

  return false if key != other.key
  return false if name != other.name
  return false if caller != other.caller
  return false if direction != other.direction
  return false if organizer(raise_when_missing: false) != other.organizer(raise_when_missing: false)

  true
end

#alias?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



50
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 50

delegate :alias?, to: :caller

#define_output_in_container!(container, index:) ⇒ 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 true if method is just defined, false if already defined.

Parameters:

Returns:

  • (Boolean)

    true if method is just defined, false if already defined.

Since:

  • 1.0.0



116
117
118
119
120
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 116

def define_output_in_container!(container, index:)
  direction.define_output_in_container!(container, index: index, method: self)

  caller.define_output_in_container!(container, index: index, method: self)
end

#has_organizer?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



104
105
106
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 104

def has_organizer?
  Utils.to_bool(organizer(raise_when_missing: false))
end

#initialize(key:, name:, caller:, direction:, organizer: nil) ⇒ 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.



75
76
77
78
79
80
81
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 75

def initialize(key:, name:, caller:, direction:, organizer: nil)
  @key = key
  @name = name
  @caller = caller
  @direction = direction
  @organizer = organizer
end

#organizer(raise_when_missing: true) ⇒ 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.

Parameters:

  • raise_when_missing (Boolean) (defaults to: true)

Returns:

Raises:

Since:

  • 1.0.0



88
89
90
91
92
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 88

def organizer(raise_when_missing: true)
  ::ConvenientService.raise Exceptions::MethodHasNoOrganizer.new(method: self) if @organizer.nil? && raise_when_missing

  @organizer
end

#proc?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



55
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 55

delegate :proc?, to: :caller

#raw?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
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 60

delegate :raw?, to: :caller

#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



148
149
150
151
152
153
154
155
156
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 148

def to_arguments
  Support::Arguments.new(
    key: key,
    name: name,
    caller: caller,
    direction: direction,
    organizer: organizer(raise_when_missing: false)
  )
end

#to_kwargsHash{Symbol => Object}

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:

  • (Hash{Symbol => Object})

Since:

  • 1.0.0



141
142
143
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 141

def to_kwargs
  to_arguments.kwargs
end

#to_sString

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



65
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 65

delegate :to_s, to: :name

#usual?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



45
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 45

delegate :usual?, to: :caller

#valueObject

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 Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



97
98
99
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/concern/instance_methods.rb', line 97

def value
  @value ||= caller.calculate_value(self)
end