Method: Eye::Process#initialize
- Defined in:
- lib/eye/process.rb
#initialize(config) ⇒ Process
Returns a new instance of Process.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/eye/process.rb', line 25 def initialize(config) raise 'you must supply a pid_file location' unless config[:pid_file] @config = prepare_config(config) @watchers = {} @children = {} @triggers = [] @name = @config[:name] @states_history = Eye::Process::StatesHistory.new(100) @states_history << :unmonitored @state_call = {} debug { "creating with config: #{@config.inspect}" } add_triggers super() # for statemachine end |