Class: ConvenientService::Core::Entities::Config::Entities::Concerns::Entities::Middleware::Commands::CastMiddleware
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Core::Entities::Config::Entities::Concerns::Entities::Middleware::Commands::CastMiddleware
- Defined in:
- lib/convenient_service/core/entities/config/entities/concerns/entities/middleware/commands/cast_middleware.rb
Instance Attribute Summary collapse
-
#other ⇒ Object
readonly
Returns the value of attribute other.
Instance Method Summary collapse
- #call ⇒ ConvenientService::Core::Entities::Config::Entities::Concerns::Entities::Middleware?
- #initialize(other:) ⇒ void constructor
Methods inherited from Support::Command
Constructor Details
#initialize(other:) ⇒ void
23 24 25 |
# File 'lib/convenient_service/core/entities/config/entities/concerns/entities/middleware/commands/cast_middleware.rb', line 23 def initialize(other:) @other = other end |
Instance Attribute Details
#other ⇒ Object (readonly)
Returns the value of attribute other.
17 18 19 |
# File 'lib/convenient_service/core/entities/config/entities/concerns/entities/middleware/commands/cast_middleware.rb', line 17 def other @other end |
Instance Method Details
#call ⇒ ConvenientService::Core::Entities::Config::Entities::Concerns::Entities::Middleware?
30 31 32 33 34 35 36 |
# File 'lib/convenient_service/core/entities/config/entities/concerns/entities/middleware/commands/cast_middleware.rb', line 30 def call if other.instance_of?(::Class) && other < Entities::Middleware cast_middleware(other) elsif other.instance_of?(::Module) cast_module(other) end end |