Class: PuppetDebugger::InputResponderPlugin

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Singleton
Defined in:
lib/puppet-debugger/input_responder_plugin.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#debuggerObject

Returns the value of attribute debugger.



11
12
13
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 11

def debugger
  @debugger
end

Class Method Details

.command_completion(_buffer_words) ⇒ Object

By default this returns an empty array, your plugin can chose to override this method in order to provide the user with a list of key words based on the user’s input



45
46
47
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 45

def self.command_completion(_buffer_words)
  []
end

.command_groupString



32
33
34
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 32

def self.command_group
  self::COMMAND_GROUP
end

.command_wordsArray[String]



18
19
20
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 18

def self.command_words
  self::COMMAND_WORDS
end

.detailsHash



37
38
39
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 37

def self.details
  { words: command_words, summary: summary, group: command_group }
end

.execute(args = [], debugger) ⇒ Object



52
53
54
55
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 52

def self.execute(args = [], debugger)
  instance.debugger = debugger
  instance.run(args)
end

.summaryString



27
28
29
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 27

def self.summary
  self::SUMMARY
end

Instance Method Details

#modules_pathsObject



22
23
24
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 22

def modules_paths
  debugger.puppet_environment.full_modulepath
end

#puppet_debugger_lib_dirObject

this is the lib directory of this gem in order to load any puppet functions from this gem we need to add the lib path of this gem



66
67
68
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 66

def puppet_debugger_lib_dir
  File.expand_path(File.join(File.dirname(File.dirname(File.dirname(__FILE__))), 'lib'))
end

#run(args = []) ⇒ Object

Returns the output of the plugin command.

Raises:

  • (NotImplementedError)


59
60
61
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 59

def run(args = [])
  raise NotImplementedError
end