File: stdin.rb

package info (click to toggle)
yapra 0.1.2-7.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 616 kB
  • sloc: ruby: 3,572; javascript: 248; makefile: 10
file content (6 lines) | stat: -rw-r--r-- 192 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
## Read data from stdin -- Soutaro Matsumoto

def stdin(config, data)
  stdin_data = readlines
  (config || { "input" => "concat" })["input"] == "nothing" ? stdin_data : data + stdin_data
end