Method: Whenever::Output::Redirection#to_s

Defined in:
lib/whenever/output_redirection.rb

#to_sObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/whenever/output_redirection.rb', line 8

def to_s
  return '' unless defined?(@output)
  case @output
    when String   then redirect_from_string
    when Hash     then redirect_from_hash
    when NilClass then ">> /dev/null 2>&1"
    when Proc     then @output.call
    else ''
  end 
end