Class: Navy::Admiral::Speak

Inherits:
Speak
  • Object
show all
Defined in:
lib/navy/admiral/speak.rb

Instance Attribute Summary

Attributes inherited from Speak

#orders

Instance Method Summary collapse

Methods inherited from Speak

#after_fork, #after_stop, #before_fork, #before_stop, #curse!, #heartbeat, #initialize, #logger, #patience, #pid, #post_fork, #preload, #respawn_limit, #stderr_path, #stdout_path, #timeout, #user, #working_directory

Constructor Details

This class inherits a constructor from Navy::Speak

Instance Method Details

#before_exec(*args, &block) ⇒ Object



3
4
5
# File 'lib/navy/admiral/speak.rb', line 3

def before_exec(*args, &block)
  set_hook(:before_exec, block_given? ? block : args[0], 1)
end

#captain(label, *args, &block) ⇒ Object



7
8
9
10
# File 'lib/navy/admiral/speak.rb', line 7

def captain(label, *args, &block)
  orders.set[:captains] ||= {}
  orders.set[:captains][label] = block_given? ? block : args[0]
end