Class: ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection Private
- Inherits:
-
Object
- Object
- ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection
- Defined in:
- lib/convenient_service/support/dependency_container/entities/namespace_collection.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #<<(namespace) ⇒ ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection private
- #==(other) ⇒ Boolean? private
- #clear ⇒ ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection private
- #empty? ⇒ Boolean private
- #find_by(name: Support::NOT_PASSED) ⇒ ConvenientService::Support::DependencyContainer::Entities::Namespace? private
- #include?(namespace) ⇒ Boolean private
- #initialize(namespaces: []) ⇒ void constructor private
- #to_a ⇒ Array private
Constructor Details
#initialize(namespaces: []) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace_collection.rb', line 17 def initialize(namespaces: []) @namespaces = namespaces end |
Instance Method Details
#<<(namespace) ⇒ ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
39 40 41 42 43 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace_collection.rb', line 39 def <<(namespace) namespaces << namespace self end |
#==(other) ⇒ Boolean?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
80 81 82 83 84 85 86 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace_collection.rb', line 80 def ==(other) return unless other.instance_of?(self.class) return false if namespaces != other.namespaces true end |
#clear ⇒ ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
63 64 65 66 67 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace_collection.rb', line 63 def clear namespaces.clear self end |
#empty? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
48 49 50 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace_collection.rb', line 48 def empty? namespaces.empty? end |
#find_by(name: Support::NOT_PASSED) ⇒ ConvenientService::Support::DependencyContainer::Entities::Namespace?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 29 30 31 32 33 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace_collection.rb', line 25 def find_by(name: Support::NOT_PASSED) rules = [] rules << ->(namespace) { namespace.name.to_s == name.to_s } unless Support::NOT_PASSED[name] condition = Utils::Proc.conjunct(rules) namespaces.find(&condition) end |
#include?(namespace) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
56 57 58 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace_collection.rb', line 56 def include?(namespace) namespaces.include?(namespace) end |
#to_a ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
72 73 74 |
# File 'lib/convenient_service/support/dependency_container/entities/namespace_collection.rb', line 72 def to_a namespaces.to_a end |