Module: WashOut::Model

Defined in:
lib/wash_out/model.rb

Instance Method Summary collapse

Instance Method Details

#wash_out_columnsObject



3
4
5
# File 'lib/wash_out/model.rb', line 3

def wash_out_columns
  columns_hash
end

#wash_out_param_mapObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/wash_out/model.rb', line 7

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

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

  map
end

#wash_out_param_name(*args) ⇒ Object



25
26
27
# File 'lib/wash_out/model.rb', line 25

def wash_out_param_name(*args)
  return name.underscore
end