Class: RestPki::NamespaceManager

Inherits:
Object
  • Object
show all
Defined in:
lib/rest_pki/namespace_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNamespaceManager

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

#namespacesObject

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