Class: ConvenientService::Core::Entities::Config::Commands::FindEntityClass
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Core::Entities::Config::Commands::FindEntityClass
- Includes:
- Support::Delegate
- Defined in:
- lib/convenient_service/core/entities/config/commands/find_entity_class.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
Methods included from Support::Delegate::ClassMethodsForForwardable
Methods inherited from Support::Command
Constructor Details
#initialize(config:, name:) ⇒ void
38 39 40 41 |
# File 'lib/convenient_service/core/entities/config/commands/find_entity_class.rb', line 38 def initialize(config:, name:) @config = config @name = name end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
20 21 22 |
# File 'lib/convenient_service/core/entities/config/commands/find_entity_class.rb', line 20 def config @config end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
26 27 28 |
# File 'lib/convenient_service/core/entities/config/commands/find_entity_class.rb', line 26 def name @name end |
Instance Method Details
#call ⇒ Class
46 47 48 |
# File 'lib/convenient_service/core/entities/config/commands/find_entity_class.rb', line 46 def call klass.const_get(name, false) if klass.const_defined?(name, false) end |
#klass ⇒ Class
31 |
# File 'lib/convenient_service/core/entities/config/commands/find_entity_class.rb', line 31 delegate :klass, to: :config |