# File lib/scraperwiki.rb, line 152 def save_var(name, value, _verbose=2) val_type = value.class.to_s unless ['Fixnum','String','Float','NilClass', 'Array','Hash'].include?(val_type) puts "*** object of type #{val_type} converted to string\n" end val = val_type[/Array|Hash/] ? value.to_json : value.to_s data = { :name => name.to_s, :value_blob => val, :type => val_type } sqlite_magic_connection.save_data([:name], data, 'swvariables') end