Class: ActiveMocker::DBToRubyType

Inherits:
Object
  • Object
show all
Defined in:
lib/active_mocker/db_to_ruby_type.rb

Class Method Summary collapse

Class Method Details

.call(type) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/active_mocker/db_to_ruby_type.rb', line 4

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