Class Tap::Tasks::Signal
In: lib/tap/tasks/signal.rb
Parent: Tap::Task

::task signal via a task

Methods

build   convert_to_spec   new   process   to_spec  

Attributes

sig  [RW] 

Public Class methods

[Source]

    # File lib/tap/tasks/signal.rb, line 8
 8:         def build(spec={}, app=Tap::App.current)
 9:           new(spec['sig'], spec['config'], app)
10:         end

[Source]

    # File lib/tap/tasks/signal.rb, line 12
12:         def convert_to_spec(parser, args)
13:           if args.empty?
14:             raise "no signal specified"
15:           end
16:           
17:           {
18:             'config' => parser.nested_config,
19:             'sig'  => args.shift
20:           }
21:         end

[Source]

    # File lib/tap/tasks/signal.rb, line 26
26:       def initialize(sig, config={}, app=Tap::App.current)
27:         super(config, app)
28:         @sig = sig
29:       end

Public Instance methods

[Source]

    # File lib/tap/tasks/signal.rb, line 31
31:       def process(*args)
32:         app.signal(sig).call(args)
33:       end

[Source]

    # File lib/tap/tasks/signal.rb, line 35
35:       def to_spec
36:         spec = super
37:         spec['sig'] = sig
38:         spec
39:       end

[Validate]