Class: Pakyow::Support::ObjectNamespace Private

Inherits:
Object
  • Object
show all
Defined in:
lib/pakyow/support/makeable/object_namespace.rb

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

Constructor Details

#initialize(*namespaces) ⇒ ObjectNamespace

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 a new instance of ObjectNamespace.



9
10
11
# File 'lib/pakyow/support/makeable/object_namespace.rb', line 9

def initialize(*namespaces)
  @namespaces = namespaces.map(&:to_sym)
end

Instance Method Details

#constantObject

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.



21
22
23
24
25
# File 'lib/pakyow/support/makeable/object_namespace.rb', line 21

def constant
  @namespaces.map { |namespace|
    Support.inflector.camelize(namespace)
  }.join("::")
end

#partsObject

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.



13
14
15
# File 'lib/pakyow/support/makeable/object_namespace.rb', line 13

def parts
  @namespaces
end

#to_sObject

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/pakyow/support/makeable/object_namespace.rb', line 17

def to_s
  @namespaces.join("/")
end