Class: RestPki::NamespaceManager
- Inherits:
-
Object
- Object
- RestPki::NamespaceManager
- Defined in:
- lib/rest_pki/namespace_manager.rb
Instance Attribute Summary collapse
-
#namespaces ⇒ Object
Returns the value of attribute namespaces.
Instance Method Summary collapse
- #add_namespace(prefix, uri) ⇒ Object
-
#initialize ⇒ NamespaceManager
constructor
A new instance of NamespaceManager.
Constructor Details
#initialize ⇒ NamespaceManager
Returns a new instance of NamespaceManager.
6 7 8 |
# File 'lib/rest_pki/namespace_manager.rb', line 6 def initialize @namespaces = [] end |
Instance Attribute Details
#namespaces ⇒ Object
Returns the value of attribute namespaces.
4 5 6 |
# File 'lib/rest_pki/namespace_manager.rb', line 4 def namespaces @namespaces end |
Instance Method Details
#add_namespace(prefix, uri) ⇒ Object
10 11 12 13 |
# File 'lib/rest_pki/namespace_manager.rb', line 10 def add_namespace(prefix, uri) ns = { prefix: prefix, uri: uri } @namespaces.push(ns) end |