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
285
286
287
|
# File 'lib/r10k/puppetfile.rb', line 285
def initialize(librarian)
@librarian = librarian
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
301
302
303
|
# File 'lib/r10k/puppetfile.rb', line 301
def method_missing(method, *args)
raise NoMethodError, _("unrecognized declaration '%{method}'") % {method: method}
end
|
Instance Method Details
#forge(location) ⇒ Object
293
294
295
|
# File 'lib/r10k/puppetfile.rb', line 293
def forge(location)
@librarian.set_forge(location)
end
|
#mod(name, args = nil) ⇒ Object
289
290
291
|
# File 'lib/r10k/puppetfile.rb', line 289
def mod(name, args = nil)
@librarian.add_module(name, args)
end
|
#moduledir(location) ⇒ Object
297
298
299
|
# File 'lib/r10k/puppetfile.rb', line 297
def moduledir(location)
@librarian.set_moduledir(location)
end
|