Class: PuppetRestClient::DB::Connection
- Inherits:
-
Object
- Object
- PuppetRestClient::DB::Connection
- Defined in:
- lib/puppet-rest/db/connection.rb,
lib/puppet-rest/db/connection/facts.rb,
lib/puppet-rest/db/connection/nodes.rb,
lib/puppet-rest/db/connection/resources.rb,
lib/puppet-rest/db/connection/fact-names.rb
Defined Under Namespace
Modules: FactNames, Facts, Nodes, Resources
Instance Method Summary collapse
-
#initialize(attrs = Mash.new) ⇒ Connection
constructor
A new instance of Connection.
Methods included from Request
Methods included from Resources
Methods included from Facts
Methods included from FactNames
Methods included from Nodes
#node, #node_facts, #node_resources, #nodes
Constructor Details
#initialize(attrs = Mash.new) ⇒ Connection
Returns a new instance of Connection.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/puppet-rest/db/connection.rb', line 13 def initialize(attrs=Mash.new) attrs = PuppetRestClient::DB..merge(attrs) #unless attrs[:client_key].is_a?(OpenSSL::PKey::RSA) # attrs[:client_key] = OpenSSL::PKey::RSA.new(attrs[:client_key]) #end PuppetRestClient::DB::Config::VALID_OPTIONS_KEYS.each do |key| instance_variable_set("@#{key}".to_sym, attrs[key]) end end |