Class: ConvenientService::Core::Entities::Config::Commands::FindOrCreateEntityClass
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Core::Entities::Config::Commands::FindOrCreateEntityClass
- Includes:
- Support::Delegate
- Defined in:
- lib/convenient_service/core/entities/config/commands/find_or_create_entity_class.rb
Overview
Instance Attribute Summary collapse
- #config ⇒ Object readonly
- #name ⇒ Object readonly
Instance Method Summary collapse
Methods included from Support::Delegate::ClassMethodsForForwardable
Methods included from Support::Concern
Methods inherited from Support::Command
Constructor Details
#initialize(config:, name:) ⇒ void
38 39 40 41 |
# File 'lib/convenient_service/core/entities/config/commands/find_or_create_entity_class.rb', line 38 def initialize(config:, name:) @config = config @name = name end |
Instance Attribute Details
#config ⇒ Object (readonly)
20 21 22 |
# File 'lib/convenient_service/core/entities/config/commands/find_or_create_entity_class.rb', line 20 def config @config end |
#name ⇒ Object (readonly)
26 27 28 |
# File 'lib/convenient_service/core/entities/config/commands/find_or_create_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_or_create_entity_class.rb', line 46 def call Commands::FindEntityClass.call(config: config, name: name) || Commands::CreateEntityClass.call(config: config, name: name) end |
#klass ⇒ Class
31 |
# File 'lib/convenient_service/core/entities/config/commands/find_or_create_entity_class.rb', line 31 delegate :klass, to: :config |