Class: Ghundle::Command::ListAll
- Defined in:
- lib/ghundle/command/list_all.rb
Overview
Lists all available hooks stored in the hook home directory.
Instance Attribute Summary
Attributes inherited from Common
Instance Method Summary collapse
Methods inherited from Common
Constructor Details
This class inherits a constructor from Ghundle::Command::Common
Instance Method Details
#call ⇒ Object
8 9 10 |
# File 'lib/ghundle/command/list_all.rb', line 8 def call puts output.strip end |
#output ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/ghundle/command/list_all.rb', line 12 def output Dir[config.hooks_root.join('*')].map do |path| next if not File.directory?(path) hook = Hook.new(Source::Local.new(path)) hook_description(hook) end.join("\n") end |