Module: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Concern::InstanceMethods Private
- Defined in:
- lib/convenient_service/service/plugins/can_have_steps/entities/step/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.
Instance Attribute Summary collapse
- #args ⇒ Object readonly private
- #kwargs ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Boolean? private
- #action ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service private
- #code ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Code private
- #container ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service private
- #data ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Data private
- #define! ⇒ void private
- #error? ⇒ Boolean private
- #extra_kwargs ⇒ Hash{Symbol => Object} private
- #failure? ⇒ Boolean private
- #has_organizer? ⇒ Boolean private
- #index ⇒ Integer private
- #initialize(*args, **kwargs) ⇒ void private
- #input_arguments ⇒ ConvenientService::Support::Arguments
- #inputs ⇒ Array<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>
- #message ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Message private
- #not_error? ⇒ Boolean private
- #not_failure? ⇒ Boolean private
- #not_success? ⇒ Boolean private
- #organizer(raise_when_missing: true) ⇒ ConvenientService::Service private
- #organizer_result ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result private
- #output_values ⇒ Hash{Symbol => Object}
- #outputs ⇒ Array<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>
- #params ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Structs::Params private
- #printable_action ⇒ String private
- #printable_container ⇒ String private
- #save_outputs_in_organizer! ⇒ Boolean private
- #status ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Status private
- #success? ⇒ Boolean private
- #to_args ⇒ Array<Object> private
- #to_arguments ⇒ ConveninentService::Support::Arguments private
- #to_kwargs ⇒ Hash{Symbol => Object} private
- #to_s ⇒ String private
- #unsafe_code ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Code private
- #unsafe_data ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Data private
- #unsafe_message ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Message private
- #with_organizer(organizer) ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step private
Methods included from ConvenientService::Support::Delegate::ClassMethodsForForwardable
Methods included from ConvenientService::Support::Concern
Methods included from ConvenientService::Support::Copyable
Instance Attribute Details
#args ⇒ Object (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.
27 28 29 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 27 def args @args end |
#kwargs ⇒ Object (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.
33 34 35 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 33 def kwargs @kwargs 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.
277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 277 def ==(other) return unless other.instance_of?(self.class) return false if action != other.action return false if container != other.container return false if index != other.index return false if organizer(raise_when_missing: false) != other.organizer(raise_when_missing: false) return false if inputs != other.inputs return false if outputs != other.outputs return false if extra_kwargs != other.extra_kwargs true end |
#action ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::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.
73 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 73 delegate :action, to: :params |
#code ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Code
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.
53 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 53 delegate :code, to: :result |
#container ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::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.
97 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 97 delegate :container, to: :params |
#data ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Data
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.
43 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 43 delegate :data, to: :result |
#define! ⇒ 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.
This method returns an undefined value.
265 266 267 268 269 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 265 def define! outputs.each { |output| output.define_output_in_container!(container, index: index) } true 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.
117 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 117 delegate :error?, to: :result |
#extra_kwargs ⇒ Hash{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.
102 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 102 delegate :extra_kwargs, to: :params |
#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.
112 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 112 delegate :failure?, to: :result |
#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.
231 232 233 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 231 def has_organizer? Utils.to_bool(organizer(raise_when_missing: false)) end |
#index ⇒ Integer
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.
92 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 92 delegate :index, to: :params |
#initialize(*args, **kwargs) ⇒ 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.
141 142 143 144 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 141 def initialize(*args, **kwargs) @args = args @kwargs = kwargs end |
#input_arguments ⇒ ConvenientService::Support::Arguments
194 195 196 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 194 def input_arguments @input_arguments ||= calculate_input_arguments end |
#inputs ⇒ Array<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>
80 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 80 delegate :inputs, to: :params |
#message ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Message
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.
48 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 48 delegate :message, to: :result |
#not_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.
132 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 132 delegate :not_error?, to: :result |
#not_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.
127 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 127 delegate :not_failure?, to: :result |
#not_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.
122 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 122 delegate :not_success?, to: :result |
#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.
169 170 171 172 173 174 175 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 169 def organizer(raise_when_missing: true) @organizer ||= params.organizer ::ConvenientService.raise Exceptions::StepHasNoOrganizer.new(step: self) if @organizer.nil? && raise_when_missing @organizer end |
#organizer_result ⇒ ConvenientService::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.
180 181 182 183 184 185 186 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 180 def organizer_result original_result = result save_outputs_in_organizer! original_result end |
#output_values ⇒ Hash{Symbol => Object}
204 205 206 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 204 def output_values @output_values ||= calculate_output_values end |
#outputs ⇒ Array<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>
87 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 87 delegate :outputs, to: :params |
#params ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Structs::Params
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.
154 155 156 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 154 def params @params ||= resolve_params end |
#printable_action ⇒ String
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.
222 223 224 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 222 def printable_action action.instance_of?(::Class) ? Utils::Class.display_name(action) : action.inspect end |
#printable_container ⇒ String
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.
213 214 215 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 213 def printable_container Utils::Class.display_name(container.klass) end |
#save_outputs_in_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.
244 245 246 247 248 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 244 def save_outputs_in_organizer! output_values.each_pair { |key, value| organizer.internals.cache.scope(:step_output_values).write(key, value) } true end |
#status ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Status
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.
38 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 38 delegate :status, to: :result |
#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.
107 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 107 delegate :success?, to: :result |
#to_args ⇒ Array<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.
306 307 308 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 306 def to_args to_arguments.args end |
#to_arguments ⇒ ConveninentService::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.
324 325 326 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 324 def to_arguments Support::Arguments.new(action, **kwargs.merge(in: inputs, out: outputs, index: index, container: container, organizer: organizer(raise_when_missing: false), **extra_kwargs)) end |
#to_kwargs ⇒ Hash{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.
315 316 317 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 315 def to_kwargs to_arguments.kwargs end |
#to_s ⇒ String
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.
297 298 299 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 297 def to_s printable_action end |
#unsafe_code ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Code
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 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 68 delegate :unsafe_code, to: :result |
#unsafe_data ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Data
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.
58 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 58 delegate :unsafe_data, to: :result |
#unsafe_message ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Message
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.
63 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 63 delegate :unsafe_message, to: :result |
#with_organizer(organizer) ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step
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.
256 257 258 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/concern/instance_methods.rb', line 256 def with_organizer(organizer) copy(overrides: {kwargs: {organizer: organizer}}) end |