class Moblues::Reader::Type

Public Instance Methods

map_type_str(type_str) click to toggle source
# File lib/moblues/reader/type.rb, line 4
def map_type_str(type_str)
  case type_str
  when 'String'
    :string
  when 'Integer 16', 'Integer 32', 'Integer 64', 'Boolean', 'Float', 'Double'
    :number
  when 'Decimal'
    :decimal
  when 'Date'
    :date
  when 'Binary'
    :data
  when 'Transformable'
    :id
  else
    raise ArgumentError.new("unknown type #{type_str}")
  end
end