Module: Fluent::WatchProcessInput::OS

Defined in:
lib/fluent/plugin/in_watch_process.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:



95
96
97
# File 'lib/fluent/plugin/in_watch_process.rb', line 95

def OS.linux?
  OS.unix? and not OS.mac?
end

.mac?Boolean

Returns:



87
88
89
# File 'lib/fluent/plugin/in_watch_process.rb', line 87

def OS.mac?
 (/darwin/ =~ RUBY_PLATFORM) != nil
end

.unix?Boolean

Returns:



91
92
93
# File 'lib/fluent/plugin/in_watch_process.rb', line 91

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:



83
84
85
# File 'lib/fluent/plugin/in_watch_process.rb', line 83

def OS.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end