Class: ActiveMocker::DBToRubyType Private

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.call(type) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

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