Class: PuppetDebugger::InputResponderPlugin
- Inherits:
-
Object
- Object
- PuppetDebugger::InputResponderPlugin
- Extended by:
- Forwardable
- Includes:
- Singleton
- Defined in:
- lib/puppet-debugger/input_responder_plugin.rb
Direct Known Subclasses
PuppetDebugger::InputResponders::Benchmark, PuppetDebugger::InputResponders::Classes, PuppetDebugger::InputResponders::Classification, PuppetDebugger::InputResponders::Commands, PuppetDebugger::InputResponders::Datatypes, PuppetDebugger::InputResponders::Environment, PuppetDebugger::InputResponders::Exit, PuppetDebugger::InputResponders::FacterdbFilter, PuppetDebugger::InputResponders::Facts, PuppetDebugger::InputResponders::Functions, PuppetDebugger::InputResponders::Help, PuppetDebugger::InputResponders::Krt, PuppetDebugger::InputResponders::Play, PuppetDebugger::InputResponders::Reset, PuppetDebugger::InputResponders::Resources, PuppetDebugger::InputResponders::Set, PuppetDebugger::InputResponders::Types, PuppetDebugger::InputResponders::Vars, PuppetDebugger::InputResponders::Whereami
Instance Attribute Summary collapse
-
#debugger ⇒ Object
Returns the value of attribute debugger.
Class Method Summary collapse
-
.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.
-
.command_group ⇒ String
The name of the command group the plugin is in.
-
.command_words ⇒ Array[String]
An array of words the user can call the command with.
-
.details ⇒ Hash
A has of all the details of the plugin.
-
.execute(args = [], debugger) ⇒ Object
The output of the plugin command.
-
.summary ⇒ String
A summary of the plugin.
Instance Method Summary collapse
- #modules_paths ⇒ Object
-
#puppet_debugger_lib_dir ⇒ Object
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.
-
#run(args = []) ⇒ Object
The output of the plugin command.
Instance Attribute Details
#debugger ⇒ Object
Returns the value of attribute debugger.
9 10 11 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 9 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
43 44 45 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 43 def self.command_completion(buffer_words) [] end |
.command_group ⇒ String
Returns the name of the command group the plugin is in.
30 31 32 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 30 def self.command_group self::COMMAND_GROUP end |
.command_words ⇒ Array[String]
Returns an array of words the user can call the command with.
16 17 18 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 16 def self.command_words self::COMMAND_WORDS end |
.details ⇒ Hash
Returns a has of all the details of the plugin.
35 36 37 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 35 def self.details { words: command_words, summary: summary, group: command_group } end |
.execute(args = [], debugger) ⇒ Object
Returns the output of the plugin command.
50 51 52 53 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 50 def self.execute(args = [], debugger) instance.debugger = debugger instance.run(args) end |
.summary ⇒ String
Returns a summary of the plugin.
25 26 27 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 25 def self.summary self::SUMMARY end |
Instance Method Details
#modules_paths ⇒ Object
20 21 22 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 20 def modules_paths debugger.puppet_environment.full_modulepath end |
#puppet_debugger_lib_dir ⇒ Object
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
64 65 66 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 64 def puppet_debugger_lib_dir File.(File.join(File.dirname(File.dirname(File.dirname(__FILE__))), 'lib')) end |
#run(args = []) ⇒ Object
Returns the output of the plugin command.
57 58 59 |
# File 'lib/puppet-debugger/input_responder_plugin.rb', line 57 def run(args = []) raise NotImplementedError end |