Class: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Commands::CastParams

Inherits:
ConvenientService::Support::Command show all
Defined in:
lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ConvenientService::Support::Command

[], call

Constructor Details

#initialize(original_params:) ⇒ void



26
27
28
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 26

def initialize(original_params:)
  @original_params = original_params
end

Instance Attribute Details

#original_paramsObject (readonly)

Returns the value of attribute original_params.



20
21
22
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 20

def original_params
  @original_params
end

Instance Method Details

#actionObject

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.



49
50
51
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 49

def action
  @action ||= original_params.action
end

#callConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Structs::Params



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 33

def call
  Structs::Params.new(
    action: action,
    inputs: inputs,
    outputs: outputs,
    strict: strict,
    index: index,
    container: container,
    organizer: organizer,
    extra_kwargs: extra_kwargs
  )
end

#containerConvenientService::Service::Plugins::CanHaveSteps::Entities::Service



84
85
86
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 84

def container
  @container ||= Entities::Service.cast!(original_params.container)
end

#extra_kwargsHash{Symbol => Object}

Returns:

  • (Hash{Symbol => Object})


98
99
100
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 98

def extra_kwargs
  @extra_kwargs ||= original_params.extra_kwargs
end

#indexInteger

Returns:

  • (Integer)


77
78
79
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 77

def index
  @index ||= original_params.index
end

#inputsArray<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>



56
57
58
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 56

def inputs
  @inputs ||= cast_inputs
end

#organizerConvenientService::Service?

Returns:



91
92
93
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 91

def organizer
  Utils.memoize_including_falsy_values(self, :@organizer) { original_params.organizer }
end

#outputsArray<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>



63
64
65
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 63

def outputs
  @outputs ||= cast_outputs
end

#strictBoolean

Returns:

  • (Boolean)


70
71
72
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 70

def strict
  Utils.memoize_including_falsy_values(self, :@strict) { Utils.to_bool(original_params.strict) }
end