Module: Groonga::QueryLog::CommandLineUtils
Instance Method Summary collapse
Instance Method Details
#log_via_stdin? ⇒ Boolean
21 22 23 |
# File 'lib/groonga/query-log/commandline-utils.rb', line 21 def log_via_stdin? stdin_with_pipe? or stdin_with_redirect? end |
#stdin_with_pipe? ⇒ Boolean
25 26 27 |
# File 'lib/groonga/query-log/commandline-utils.rb', line 25 def stdin_with_pipe? File.pipe?($stdin) end |
#stdin_with_redirect? ⇒ Boolean
29 30 31 |
# File 'lib/groonga/query-log/commandline-utils.rb', line 29 def stdin_with_redirect? not File.select([$stdin], [], [], 0).nil? end |