Sha256: d3eab22d18eafe65a87fc9bc9daec7bf56f049f46913c5d9dccf3c44e08481ba

Contents?: true

Size: 531 Bytes

Versions: 7

Compression:

Stored size: 531 Bytes

Contents

module WashOut
  module Model
    def wash_out_columns
      columns_hash
    end

    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

    def wash_out_param_name(*args)
      return name.underscore
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
wash-out-0.10.1 lib/wash_out/model.rb
wash_out-0.12.0 lib/wash_out/model.rb
wash_out-0.11.0 lib/wash_out/model.rb
wash_out-0.11.0.beta.2 lib/wash_out/model.rb
wash_out-0.11.0.beta.1 lib/wash_out/model.rb
wash_out-0.10.0 lib/wash_out/model.rb
wash_out-0.9.2 lib/wash_out/model.rb