Method: Shomen::CLI::TomDocCommand#argf

Defined in:
lib/shomen/cli/tomdoc.rb

#argf(files) ⇒ Object

ARGF faker.



75
76
77
78
79
80
81
82
83
84
# File 'lib/shomen/cli/tomdoc.rb', line 75

def argf(files)
  buffer = ''

  files.select{ |arg| File.exists?(arg) }.each do |file|
    buffer << File.read(file)
  end

  require 'stringio'
  StringIO.new(buffer)
end