Class: PuppetfileEditor::DSL Private

Inherits:
Object
  • Object
show all
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

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.

Raises:

  • (NoMethodError)


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.

Returns:

  • (Boolean)


142
# File 'lib/puppetfile_editor/puppetfile.rb', line 142

def respond_to_missing?(method, include_private); end