Method: SQLite::Translator#translate

Defined in:
lib/sqlite/translator.rb

#translate(type, value) ⇒ Object

Translate the given string value to a value of the given type. In the absense of an installed translator block for the given type, the value itself is always returned. Further, nil values are never translated, and are always passed straight through regardless of the type parameter.



75
76
77
78
79
# File 'lib/sqlite/translator.rb', line 75

def translate( type, value )
  unless value.nil?
    @translators[ type_name( type ) ].call( type, value )
  end
end