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, *_why_am_i_here) ⇒ Object private
- #mod(name, args = nil) ⇒ Object private
- #respond_to_missing?(method, include_private) ⇒ Boolean 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.
130 131 132 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 130 def initialize(librarian) @librarian = librarian end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *_why_am_i_here) ⇒ 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.
144 145 146 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 144 def method_missing(method, *_why_am_i_here) 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.
138 139 140 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 138 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.
134 135 136 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 134 def mod(name, args = nil) @librarian.add_module(name, args) end |
#respond_to_missing?(method, include_private) ⇒ Boolean
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.
142 |
# File 'lib/puppetfile_editor/puppetfile.rb', line 142 def respond_to_missing?(method, include_private); end |