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
95
96
97
|
# File 'lib/r10k/puppetfile.rb', line 95
def initialize(librarian)
@librarian = librarian
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
111
112
113
|
# File 'lib/r10k/puppetfile.rb', line 111
def method_missing(method, *args)
raise NoMethodError, "unrecognized declaration '#{method}'"
end
|
Instance Method Details
#forge(location) ⇒ Object
103
104
105
|
# File 'lib/r10k/puppetfile.rb', line 103
def forge(location)
@librarian.set_forge(location)
end
|
#mod(name, args = []) ⇒ Object
99
100
101
|
# File 'lib/r10k/puppetfile.rb', line 99
def mod(name, args = [])
@librarian.add_module(name, args)
end
|
#moduledir(location) ⇒ Object
107
108
109
|
# File 'lib/r10k/puppetfile.rb', line 107
def moduledir(location)
@librarian.set_moduledir(location)
end
|