Class: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::DefineMethodInContainer
- Inherits:
-
ConvenientService::Support::Command
- Object
- ConvenientService::Support::Command
- ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::DefineMethodInContainer
- Includes:
- ConvenientService::Support::Delegate
- Defined in:
- lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
- #call ⇒ Boolean
- #initialize(method:, container:, index:) ⇒ void constructor
- #key ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Entities::Key
- #name ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Entities::Name
Methods included from ConvenientService::Support::Concern
Methods inherited from ConvenientService::Support::Command
Constructor Details
#initialize(method:, container:, index:) ⇒ void
47 48 49 50 51 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb', line 47 def initialize(method:, container:, index:) @method = method @container = container @index = index end |
Instance Attribute Details
#container ⇒ Object (readonly)
Returns the value of attribute container.
23 24 25 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb', line 23 def container @container end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
29 30 31 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb', line 29 def index @index end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
17 18 19 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb', line 17 def method @method end |
Instance Method Details
#call ⇒ Boolean
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb', line 59 def call <<~RUBY.tap { |code| container.klass.class_eval(code, __FILE__, __LINE__ + 1) } ## # @return [Object] Can be any type. # @raise [ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Exceptions::OutMethodStepIsNotCompleted] # def #{name} internals.cache.scope(:step_output_values).fetch(__method__) do ::ConvenientService.raise ::ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Exceptions::OutMethodStepIsNotCompleted.new(method_name: __method__) end end RUBY true end |
#key ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Entities::Key
34 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb', line 34 delegate :key, to: :method |
#name ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Entities::Name
39 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/define_method_in_container.rb', line 39 delegate :name, to: :method |