Class: R10K::Librarian
- Inherits:
-
Object
- Object
- R10K::Librarian
- Defined in:
- lib/r10k/librarian.rb
Defined Under Namespace
Classes: DSL
Instance Attribute Summary collapse
-
#forge ⇒ Object
readonly
Returns the value of attribute forge.
Instance Method Summary collapse
- #add_module(name, args) ⇒ Object
-
#initialize(puppetfile) ⇒ Librarian
constructor
A new instance of Librarian.
- #load ⇒ Object
-
#set_forge(forge) ⇒ Object
This method only exists because people tried being excessively clever.
Constructor Details
#initialize(puppetfile) ⇒ Librarian
Returns a new instance of Librarian.
8 9 10 11 12 |
# File 'lib/r10k/librarian.rb', line 8 def initialize(puppetfile) @puppetfile = puppetfile @modules = [] @forge = 'forge.puppetlabs.com' end |
Instance Attribute Details
#forge ⇒ Object (readonly)
Returns the value of attribute forge.
6 7 8 |
# File 'lib/r10k/librarian.rb', line 6 def forge @forge end |
Instance Method Details
#add_module(name, args) ⇒ Object
26 27 28 |
# File 'lib/r10k/librarian.rb', line 26 def add_module(name, args) @modules << [name, args] end |
#load ⇒ Object
14 15 16 17 18 19 |
# File 'lib/r10k/librarian.rb', line 14 def load dsl = R10K::Librarian::DSL.new(self) dsl.instance_eval(File.read(@puppetfile), @puppetfile) @modules end |
#set_forge(forge) ⇒ Object
This method only exists because people tried being excessively clever.
22 23 24 |
# File 'lib/r10k/librarian.rb', line 22 def set_forge(forge) @forge = forge end |