Sha256: cebf3073a06372d4b6bb217eb5ad1aab27fac11415bdad15c87286995b4ac62f

Contents?: true

Size: 511 Bytes

Versions: 6

Compression:

Stored size: 511 Bytes

Contents

module ActiveMocker
  # @api private
  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
        when :hstore
          Hash
      end
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
active_mocker-1.8.4 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.8.3 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.8.2 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.8.1 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.8 lib/active_mocker/db_to_ruby_type.rb
active_mocker-1.7.3 lib/active_mocker/db_to_ruby_type.rb