Class: Ghundle::Command::Run
- Defined in:
- lib/ghundle/command/run.rb
Overview
Runs the given hook, providing it with the rest of the positional arguments on the command-line.
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
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ghundle/command/run.rb', line 10 def call name = args.first hook_path = config.hook_path(name) hook = Hook.new(Source::Local.new(hook_path)) say "Running hook #{hook.name}" Signal.trap('INT') do say "Ctrl+C caught, aborting" exit end hook.run(*args[1 .. -1]) Signal.trap('INT', 'DEFAULT') end |