Class: FileMonitor::Hooks::StandardOutput
- Inherits:
-
Object
- Object
- FileMonitor::Hooks::StandardOutput
- Defined in:
- lib/file_monitor/hooks/standard_output.rb
Class Method Summary collapse
- .io ⇒ Object
- .io=(_io) ⇒ Object
-
.run(*args) ⇒ Object
This is the default hook.
Class Method Details
.io ⇒ Object
9 10 11 12 |
# File 'lib/file_monitor/hooks/standard_output.rb', line 9 def self.io @io = STDOUT if @io.nil? @io end |
.io=(_io) ⇒ Object
14 15 16 |
# File 'lib/file_monitor/hooks/standard_output.rb', line 14 def self.io= _io @io = _io # Set to a file, StringIO, etc. StringIO is used for specs. end |
.run(*args) ⇒ Object
This is the default hook. Writes CREATE, UPDATE and DELETE events to STDOUT
5 6 7 |
# File 'lib/file_monitor/hooks/standard_output.rb', line 5 def self.run *args io.puts args.inspect end |