Method: Conductor.stdin

Defined in:
lib/conductor.rb

.stdinString

Return STDIN value, reading from STDIN if needed

Returns:



35
36
37
38
# File 'lib/conductor.rb', line 35

def stdin
  warn "input on STDIN required" unless ENV["CONDUCTOR_TEST"] || $stdin.stat.size.positive? || $stdin.fcntl(Fcntl::F_GETFL, 0).zero?
  @stdin ||= $stdin.read.force_encoding("utf-8")
end