Class: BioTable::TableWriter::Writer
- Inherits:
-
Object
- Object
- BioTable::TableWriter::Writer
- Defined in:
- lib/bio-table/tablewriter.rb
Instance Method Summary collapse
-
#initialize(format = :tab, evaluate = nil) ⇒ Writer
constructor
A new instance of Writer.
- #write(row, type) ⇒ Object
Constructor Details
#initialize(format = :tab, evaluate = nil) ⇒ Writer
Returns a new instance of Writer.
6 7 8 |
# File 'lib/bio-table/tablewriter.rb', line 6 def initialize format=:tab, evaluate=nil @formatter = FormatFactory::create(format,evaluate) end |
Instance Method Details
#write(row, type) ⇒ Object
10 11 12 |
# File 'lib/bio-table/tablewriter.rb', line 10 def write row,type @formatter.write(row.all_fields) if row.all_valid? end |