Method: M4DBI::Model#to_h

Defined in:
lib/m4dbi/model.rb

#to_hObject



490
491
492
493
494
495
496
497
# File 'lib/m4dbi/model.rb', line 490

def to_h
  h = Hash.new
  self.class.columns.each do |col|
    col_name = col['name'].to_s
    h[col_name] = @row[col_name]
  end
  h
end