Sha256: e6df5c12bf6ca544677d78f9da519b9f6d2eb788afac6b35841e31bb89a732e1

Contents?: true

Size: 458 Bytes

Versions: 5

Compression:

Stored size: 458 Bytes

Contents

module ActiveMocker
  class DBToRubyType

    def self.call(type)
      case type
        when :integer
          Fixnum
        when :float
          Float
        when :decimal
          BigDecimal
        when :timestamp, :time
          Time
        when :datetime
          DateTime
        when :date
          Date
        when :text, :string, :binary
          String
        when :boolean
          Axiom::Types::Boolean
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_mocker-1.5.2 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.5.1 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.5 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.4.2 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.4.1 lib/active_mocker/db_to_ruby_type.rb