Class: R10K::Puppetfile::DSL
- Inherits:
-
Object
- Object
- R10K::Puppetfile::DSL
show all
- Defined in:
- lib/r10k/puppetfile.rb
Instance Method Summary
collapse
Constructor Details
#initialize(librarian) ⇒ DSL
This method is part of a private API.
You should avoid using this method if possible, as it may be removed or be changed in the future.
A barebones implementation of the Puppetfile DSL
94
95
96
|
# File 'lib/r10k/puppetfile.rb', line 94
def initialize(librarian)
@librarian = librarian
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
110
111
112
|
# File 'lib/r10k/puppetfile.rb', line 110
def method_missing(method, *args)
raise NoMethodError, "unrecognized declaration '#{method}'"
end
|
Instance Method Details
#forge(location) ⇒ Object
102
103
104
|
# File 'lib/r10k/puppetfile.rb', line 102
def forge(location)
@librarian.set_forge(location)
end
|
#mod(name, args = []) ⇒ Object
98
99
100
|
# File 'lib/r10k/puppetfile.rb', line 98
def mod(name, args = [])
@librarian.add_module(name, args)
end
|
#moduledir(location) ⇒ Object
106
107
108
|
# File 'lib/r10k/puppetfile.rb', line 106
def moduledir(location)
@librarian.set_moduledir(location)
end
|