class Rasti::DB::TypeConverters::SQLiteTypes::Array
Public Class Methods
column_type_regex()
click to toggle source
# File lib/rasti/db/type_converters/sqlite_types/array.rb, line 9 def column_type_regex /^([a-z]+)\[\]$/ end
from_db(object)
click to toggle source
# File lib/rasti/db/type_converters/sqlite_types/array.rb, line 24 def from_db(object) JSON.parse object end
respond_for?(object)
click to toggle source
# File lib/rasti/db/type_converters/sqlite_types/array.rb, line 17 def respond_for?(object) parsed = JSON.parse object object == to_db(parsed) rescue false end
to_db(values)
click to toggle source
# File lib/rasti/db/type_converters/sqlite_types/array.rb, line 13 def to_db(values) JSON.dump(values) end