Class: Eve::FileNotifierConnection
- Inherits:
-
EventMachine::FileWatch
- Object
- EventMachine::FileWatch
- Eve::FileNotifierConnection
- Defined in:
- lib/eve/file_notifier_server.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#server ⇒ Object
Returns the value of attribute server.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
55 56 57 |
# File 'lib/eve/file_notifier_server.rb', line 55 def app @app end |
#server ⇒ Object
Returns the value of attribute server.
56 57 58 |
# File 'lib/eve/file_notifier_server.rb', line 56 def server @server end |
Class Method Details
.run(args) ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/eve/file_notifier_server.rb', line 67 def self.run(args) @@data = FileNotifierServer.handle_args(args) EM.kqueue = true if EM.kqueue? # file watching requires kqueue on OSX EM.run { EM.watch_file(@@data[:source], FileNotifierConnection) } end |
Instance Method Details
#file_modified ⇒ Object
63 64 65 |
# File 'lib/eve/file_notifier_server.rb', line 63 def file_modified @server.file_modified end |
#post_init ⇒ Object
58 59 60 61 |
# File 'lib/eve/file_notifier_server.rb', line 58 def post_init @server = FileNotifierServer.new(self,@@data) @server.post_init end |