Module: Fluent::WatchProcessInput::OS

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

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


98
99
100
# File 'lib/fluent/plugin/in_watch_process.rb', line 98

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

.mac?Boolean

Returns:

  • (Boolean)


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

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

.unix?Boolean

Returns:

  • (Boolean)


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

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


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

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