Class: PuppetHerald::Database
- Inherits:
-
Object
- Object
- PuppetHerald::Database
- Defined in:
- lib/puppet-herald/database.rb
Overview
A class for a database configuration
Instance Attribute Summary collapse
-
#dbconn ⇒ String
writeonly
Sets a database connection.
-
#passfile ⇒ String
writeonly
Sets a passfile.
Instance Method Summary collapse
-
#initialize ⇒ Database
constructor
A new instance of Database.
-
#spec(log = false) ⇒ Hash
Compiles a spec for database creation.
Constructor Details
#initialize ⇒ Database
Returns a new instance of Database.
8 9 10 11 |
# File 'lib/puppet-herald/database.rb', line 8 def initialize @dbconn = nil @passfile = nil end |
Instance Attribute Details
#dbconn=(value) ⇒ String (writeonly)
Sets a database connection
15 16 17 |
# File 'lib/puppet-herald/database.rb', line 15 def dbconn=(value) @dbconn = value end |
#passfile=(value) ⇒ String (writeonly)
Sets a passfile
19 20 21 |
# File 'lib/puppet-herald/database.rb', line 19 def passfile=(value) @passfile = value end |
Instance Method Details
#spec(log = false) ⇒ Hash
Compiles a spec for database creation
25 26 27 28 29 |
# File 'lib/puppet-herald/database.rb', line 25 def spec(log = false) connection = process_spec print_config(connection, log) connection end |