Class: ConvenientService::Support::DependencyContainer::Entities::Namespace Private

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/support/dependency_container/entities/namespace.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.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:) ⇒ 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.

Parameters:

  • name (String, Symbol)

Since:

  • 1.0.0



23
24
25
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 23

def initialize(name:)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

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.

Since:

  • 1.0.0



17
18
19
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 17

def name
  @name
end

Instance Method Details

#==(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.

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



54
55
56
57
58
59
60
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 54

def ==(other)
  return unless other.instance_of?(self.class)

  return false if name != other.name

  true
end

#bodyProc

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.

Returns:

  • (Proc)

Since:

  • 1.0.0



30
31
32
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 30

def body
  @body ||= -> { namespace }
end

#define_method(name, &body) ⇒ Symbol

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.

Parameters:

  • name (String, Symbol)
  • body (Proc)

Returns:

  • (Symbol)

Since:

  • 1.0.0



46
47
48
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 46

def define_method(name, &body)
  define_singleton_method(name, &body)
end

#namespacesConvenientService::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.



37
38
39
# File 'lib/convenient_service/support/dependency_container/entities/namespace.rb', line 37

def namespaces
  @namespaces ||= Entities::NamespaceCollection.new
end