Class: PuppetDebugger::InputResponders::Classes
Constant Summary
collapse
- COMMAND_WORDS =
%w(classes)
- SUMMARY =
'List all the classes current in the catalog.'
- COMMAND_GROUP =
:scope
Instance Attribute Summary
#debugger
Instance Method Summary
collapse
command_completion, command_group, command_words, details, execute, #modules_paths, #puppet_debugger_lib_dir, summary
Instance Method Details
#find_classes(classes, filter = []) ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/plugins/puppet-debugger/input_responders/classes.rb', line 15
def find_classes(classes, filter = [])
return classes if filter.nil? || filter.empty?
filter_string = filter.join(' ').downcase
classes.find_all do |klass|
klass.downcase.include?(filter_string)
end
end
|
#run(args = []) ⇒ Object
9
10
11
12
13
|
# File 'lib/plugins/puppet-debugger/input_responders/classes.rb', line 9
def run(args = [])
filter = args
classes = find_classes(debugger.catalog.classes, filter)
classes.ai
end
|