Class: OptionParser

Inherits:
Object
  • Object
show all
Defined in:
lib/tomdoc/cli.rb

Instance Method Summary collapse

Instance Method Details

#argfObject

ARGF faker.



125
126
127
128
129
130
131
132
133
134
# File 'lib/tomdoc/cli.rb', line 125

def argf
  buffer = ''

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

  require 'stringio'
  StringIO.new(buffer)
end