Method: EaseEngine::Application#initialize
- Defined in:
- lib/ease_engine/application.rb
#initialize(options) ⇒ Application
Returns a new instance of Application.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/ease_engine/application.rb', line 52 def initialize( ) @options = if ! @options.key?( :watcher ) @options[ :watcher ] = {} end if ! @options.key?( :timer ) @options[ :timer ] = {} end if ! @options.key?( :socket_timer ) @options[ :socket_timer ] = { :connect_timeout_usec => 10000000, :connected_timeout_usec => 10000000, } end @options[ :is_daemon ] = false if ! @options.key?( :is_daemon ) @exit_status = 0 @is_update = false @watcher = EaseEngine::Watcher.new( @options[ :watcher ] ) @measure = EaseEngine::Measure.new @timer = EaseEngine::Timer.new( @options[ :timer ] ) @socket_timer = EaseEngine::Timer.new( @options[ :socket_timer ] ) @is_daemon = @options[ :is_daemon ] end |