Class: ConvenientService::Support::DependencyContainer::Commands::ImportMethod
- Inherits:
-
Command
- Object
- Command
- ConvenientService::Support::DependencyContainer::Commands::ImportMethod
- Includes:
- ConvenientService::Support::Delegate
- Defined in:
- lib/convenient_service/support/dependency_container/commands/import_method.rb
Instance Attribute Summary collapse
-
#exported_method ⇒ Object
readonly
Returns the value of attribute exported_method.
-
#importing_module ⇒ Object
readonly
Returns the value of attribute importing_module.
-
#prepend ⇒ Object
readonly
Returns the value of attribute prepend.
- #scope ⇒ Symbol readonly
Instance Method Summary collapse
- #call ⇒ ConvenientService::Support::DependencyContainer::Method
-
#initialize(importing_module:, exported_method:, prepend:) ⇒ ImportMethod
constructor
A new instance of ImportMethod.
Methods included from Concern
Methods inherited from Command
Constructor Details
#initialize(importing_module:, exported_method:, prepend:) ⇒ ImportMethod
Returns a new instance of ImportMethod.
39 40 41 42 43 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 39 def initialize(importing_module:, exported_method:, prepend:) @importing_module = importing_module @exported_method = exported_method @prepend = prepend end |
Instance Attribute Details
#exported_method ⇒ Object (readonly)
Returns the value of attribute exported_method.
20 21 22 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 20 def exported_method @exported_method end |
#importing_module ⇒ Object (readonly)
Returns the value of attribute importing_module.
14 15 16 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 14 def importing_module @importing_module end |
#prepend ⇒ Object (readonly)
Returns the value of attribute prepend.
26 27 28 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 26 def prepend @prepend end |
#scope ⇒ Symbol (readonly)
32 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 32 delegate :scope, to: :exported_method |
Instance Method Details
#call ⇒ ConvenientService::Support::DependencyContainer::Method
48 49 50 51 52 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 48 def call import imported_scoped_methods exported_method.define_in_module!(imported_scoped_methods) end |