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.
82 83 84 |
# File 'lib/rbhive/connection.rb', line 82 def initialize(rows) super(rows.map {|r| r.split("\t") }) end |
Instance Method Details
#to_csv(out_file = nil) ⇒ Object
86 87 88 |
# File 'lib/rbhive/connection.rb', line 86 def to_csv(out_file=nil) output(",", out_file) end |
#to_tsv(out_file = nil) ⇒ Object
90 91 92 |
# File 'lib/rbhive/connection.rb', line 90 def to_tsv(out_file=nil) output("\t", out_file) end |