Method: EaseEngine::Watcher#initialize
- Defined in:
- lib/ease_engine/watcher.rb
#initialize(options = {}) ⇒ Watcher
Returns a new instance of Watcher.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/ease_engine/watcher.rb', line 29 def initialize( = {} ) # 環境に合わせて適切なものを選択 if ! .key?( :backend ) backend = :select if EaseEngine::Platform.mac? backend = :kqueue elsif EaseEngine::Platform.linux? backend = :epoll end [ :backend ] = backend end EaseEngine::Log.inf( "Watcher #{}" ) @loop = Cool.io::Loop.new( ) @watches = {} end |