Class: RBHive::ResultSet
- Inherits:
-
Array
- Object
- Array
- RBHive::ResultSet
- Defined in:
- lib/rbhive/connection.rb
Instance Method Summary collapse
-
#initialize(rows) ⇒ ResultSet
constructor
A new instance of ResultSet.
- #to_csv(out_file = nil) ⇒ Object
- #to_tsv(out_file = nil) ⇒ Object
Constructor Details
#initialize(rows) ⇒ ResultSet
Returns a new instance of ResultSet.
87 88 89 |
# File 'lib/rbhive/connection.rb', line 87 def initialize(rows) super(rows.map {|r| r.split("\t") }) end |
Instance Method Details
#to_csv(out_file = nil) ⇒ Object
91 92 93 |
# File 'lib/rbhive/connection.rb', line 91 def to_csv(out_file=nil) output(",", out_file) end |
#to_tsv(out_file = nil) ⇒ Object
95 96 97 |
# File 'lib/rbhive/connection.rb', line 95 def to_tsv(out_file=nil) output("\t", out_file) end |