Class: Provider::File::BufferedStdIn
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(*ignored) ⇒ BufferedStdIn
constructor
A new instance of BufferedStdIn.
Methods inherited from Base
Constructor Details
#initialize(*ignored) ⇒ BufferedStdIn
Returns a new instance of BufferedStdIn.
108 109 110 |
# File 'lib/providers.rb', line 108 def initialize(*ignored) super nil end |
Instance Method Details
#each ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/providers.rb', line 112 def each file = [] until STDIN.eof? file << STDIN.readline.rstrip end file.each do |line| next if line.empty? path, file = ::File.split(line) yield path, file end end |