Method: Conductor.stdin
- Defined in:
- lib/conductor.rb
.stdin ⇒ String
Return STDIN value, reading from STDIN if needed
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 |