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 ConvenientService::Support::Delegate::ClassMethodsForForwardable
Methods inherited from Command
Constructor Details
#initialize(importing_module:, exported_method:, prepend:) ⇒ ImportMethod
Returns a new instance of ImportMethod.
44 45 46 47 48 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 44 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.
25 26 27 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 25 def exported_method @exported_method end |
#importing_module ⇒ Object (readonly)
Returns the value of attribute importing_module.
19 20 21 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 19 def importing_module @importing_module end |
#prepend ⇒ Object (readonly)
Returns the value of attribute prepend.
31 32 33 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 31 def prepend @prepend end |
#scope ⇒ Symbol (readonly)
37 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 37 delegate :scope, to: :exported_method |
Instance Method Details
#call ⇒ ConvenientService::Support::DependencyContainer::Method
53 54 55 56 57 |
# File 'lib/convenient_service/support/dependency_container/commands/import_method.rb', line 53 def call import imported_scoped_methods exported_method.define_in_module!(imported_scoped_methods) end |