Class: PuppetfileEditor::DSL Private
- Inherits:
-
Object
- Object
- PuppetfileEditor::DSL
- Defined in:
- lib/puppetfile_editor/puppetfile.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A barebones implementation of the Puppetfile DSL
Instance Method Summary collapse
- #forge(url) ⇒ Object private
-
#initialize(librarian) ⇒ DSL
constructor
private
A new instance of DSL.
- #method_missing(method, *_) ⇒ Object private
- #mod(name, args = nil) ⇒ Object private
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.
Returns a new instance of DSL.
121 122 123 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 121 def initialize(librarian) @librarian = librarian end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *_) ⇒ Object
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.
133 134 135 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 133 def method_missing(method, *_) raise NoMethodError, "Unrecognized declaration: '#{method}'" end |
Instance Method Details
#forge(url) ⇒ Object
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.
129 130 131 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 129 def forge(url) @librarian.update_forge_url(url) end |
#mod(name, args = nil) ⇒ Object
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.
125 126 127 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 125 def mod(name, args = nil) @librarian.add_module(name, args) end |