Class: ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::Caller::Commands::CastCaller

Inherits:
Support::Command
  • Object
show all
Defined in:
lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/commands/cast_caller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(other:) ⇒ void



23
24
25
# File 'lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/commands/cast_caller.rb', line 23

def initialize(other:)
  @other = other
end

Instance Attribute Details

#otherObject (readonly)

Returns the value of attribute other.



17
18
19
# File 'lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/commands/cast_caller.rb', line 17

def other
  @other
end

Instance Method Details

#callConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::Caller?



30
31
32
33
34
35
36
37
# File 'lib/convenient_service/core/entities/config/entities/method_middlewares/entities/caller/commands/cast_caller.rb', line 30

def call
  case other
  when ::Hash
    cast_hash(other)
  when Caller
    cast_caller(other)
  end
end