Class: CSV_MODULE::MyCSV
- Inherits:
-
Object
- Object
- CSV_MODULE::MyCSV
- Defined in:
- lib/sentra/rest_client.rb
Instance Method Summary collapse
- #get_queries ⇒ Object
-
#initialize(filename, scheme = nil) ⇒ MyCSV
constructor
A new instance of MyCSV.
Constructor Details
#initialize(filename, scheme = nil) ⇒ MyCSV
Returns a new instance of MyCSV.
6 7 8 9 |
# File 'lib/sentra/rest_client.rb', line 6 def initialize filename, scheme=nil @filename = filename @scheme = scheme end |
Instance Method Details
#get_queries ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/sentra/rest_client.rb', line 11 def get_queries queries = [] CSV.foreach(@filename, :headers=> true) do |row| queries.push(row.to_hash) #p row.to_hash end queries end |