Class: ConvenientService::Support::DependencyContainer::Entities::Namespace
- Inherits:
-
Object
- Object
- ConvenientService::Support::DependencyContainer::Entities::Namespace
- Defined in:
- lib/convenient_service/support/dependency_container/entities/namespace.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Boolean
- #body ⇒ Proc
- #define_method(name, &body) ⇒ Symbol
- #initialize(name:) ⇒ void constructor
- #namespaces ⇒ ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection
Constructor Details
#initialize(name:) ⇒ void
18 19 20 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 18 def initialize(name:) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 12 def name @name end |
Instance Method Details
#==(other) ⇒ Boolean
49 50 51 52 53 54 55 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 49 def ==(other) return unless other.instance_of?(self.class) return false if name != other.name true end |
#body ⇒ Proc
25 26 27 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 25 def body @body ||= -> { namespace } end |
#define_method(name, &body) ⇒ Symbol
41 42 43 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 41 def define_method(name, &body) define_singleton_method(name, &body) end |
#namespaces ⇒ ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection
32 33 34 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 32 def namespaces @namespaces ||= Entities::NamespaceCollection.new end |