Class: Provider::File::StdIn

Inherits:
Base show all
Defined in:
lib/providers.rb

Instance Attribute Summary

Attributes inherited from Base

#folders

Instance Method Summary collapse

Methods inherited from Base

#reverse

Constructor Details

#initialize(*ignored) ⇒ StdIn

Returns a new instance of StdIn.



127
128
129
# File 'lib/providers.rb', line 127

def initialize(*ignored)
  super nil
end

Instance Method Details

#eachObject



131
132
133
134
135
136
137
138
# File 'lib/providers.rb', line 131

def each
  until STDIN.eof?
    line = STDIN.readline.rstrip
    next if line.empty?
    path, file = ::File.split(line)
    yield path, file
  end
end