Class: Icinga::CSVResponder
- Defined in:
- lib/icinga/responder/csv.rb
Instance Method Summary collapse
Methods inherited from Responder
create, #each, #initialize, #response, #to_s
Constructor Details
This class inherits a constructor from Icinga::Responder
Instance Method Details
#data ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/icinga/responder/csv.rb', line 5 def data = {:headers => :first_row, :col_sep => ";", :quote_char => "'"} CSV.parse(response.body.strip, ).collect do |row| new_hash = {} row.to_hash.each_pair do |k,v| new_hash.merge!({k.downcase => v}) end new_hash end end |