Class: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::CastMethodDirection
- Inherits:
-
ConvenientService::Support::Command
- Object
- ConvenientService::Support::Command
- ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::CastMethodDirection
- Defined in:
- lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_direction.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#other ⇒ Object
readonly
Returns the value of attribute other.
Instance Method Summary collapse
- #call ⇒ Entities::Directions::Base?
-
#initialize(other:, options:) ⇒ CastMethodDirection
constructor
A new instance of CastMethodDirection.
Methods inherited from ConvenientService::Support::Command
Constructor Details
#initialize(other:, options:) ⇒ CastMethodDirection
Returns a new instance of CastMethodDirection.
31 32 33 34 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_direction.rb', line 31 def initialize(other:, options:) @other = other @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
19 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_direction.rb', line 19 attr_reader :other |
#other ⇒ Object (readonly)
Returns the value of attribute other.
19 20 21 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_direction.rb', line 19 def other @other end |
Instance Method Details
#call ⇒ Entities::Directions::Base?
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/method/commands/cast_method_direction.rb', line 39 def call casted = case [:direction] when ::Symbol then cast_symbol when ::String then cast_string end ## # TODO: Specs. Priority. # return casted if casted case other when Method then cast_method end end |