Module: WashOut::Model

Defined in:
lib/wash_out/model.rb

Instance Method Summary collapse

Instance Method Details

#wash_out_param_mapObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/wash_out/model.rb', line 3

def wash_out_param_map
  types = {
    :text      => :string,
    :float     => :double,
    :decimal   => :double,
    :timestamp => :string
  }
  map = {}

  columns_hash.each do |key, column|
    type = column.type
    type = types[type] if types.has_key?(type)
    map[key] = type
  end

  map
end

#wash_out_param_nameObject



21
22
23
# File 'lib/wash_out/model.rb', line 21

def wash_out_param_name
  return name.underscore
end