Class: DbAgile::IO::Ruby::Reader
- Inherits:
-
Object
- Object
- DbAgile::IO::Ruby::Reader
- Defined in:
- lib/dbagile/io/ruby.rb
Instance Method Summary collapse
-
#initialize(io, options) ⇒ Reader
constructor
A new instance of Reader.
-
#read(file) ⇒ Object
Reads content of a file.
- #tuples ⇒ Object
Constructor Details
#initialize(io, options) ⇒ Reader
Returns a new instance of Reader.
7 8 9 10 |
# File 'lib/dbagile/io/ruby.rb', line 7 def initialize(io, ) @io = io @options = end |
Instance Method Details
#read(file) ⇒ Object
Reads content of a file
13 14 15 16 17 18 |
# File 'lib/dbagile/io/ruby.rb', line 13 def read(file) if @options[:input_file] file = File.join(File.dirname(@options[:input_file]), file) end File.read(file) end |
#tuples ⇒ Object
20 21 22 |
# File 'lib/dbagile/io/ruby.rb', line 20 def tuples self.instance_eval(@io.read) end |