Sha256: 1c5ec0e31e89f18b19d2bc1fe332f78bc9af871f1305c1a66ad724416d858954

Contents?: true

Size: 331 Bytes

Versions: 5

Compression:

Stored size: 331 Bytes

Contents

#coding: utf-8
require 'csv'
class CSV::Row

  def update(conditions)
    conditions.each do |key, value|
      raise "In headers: '#{self.headers}' don't have key: '#{key}'" unless self.include?(key)
      self[key] = value
    end
  rescue Exception => e
    puts "#{self.class}  #{e.message}"
  end

  def delete
    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
smart_csv-0.0.9 lib/csv/row/row.rb
smart_csv-0.0.7 lib/csv/row/row.rb
smart_csv-0.0.6 lib/csv/row/row.rb
smart_csv-0.0.5 lib/csv/row/row.rb
smart_csv-0.0.2 lib/csv/row/row.rb