Sha256: b5fa7321af55cd18ba4ac76140344ee3002c5d6d12c1545e05aab0414a96f93a
Contents?: true
Size: 787 Bytes
Versions: 96
Compression:
Stored size: 787 Bytes
Contents
require 'iconv' module Six module Query class Base include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::TextHelper extend ActionView::Helpers::SanitizeHelper::ClassMethods attr_reader(:ic) class TimeoutError < StandardError end #def strip_tags(c); c.strip; end def logger ActionController::Base.logger end def ic @ic ||= Iconv.new('UTF-8//IGNORE', 'UTF-8') end def clean(value) case value when /\A-?[0-9][0-9]*\.[0-9]*\Z/ value.to_f when /\A-?[0-9][0-9]*\Z/ value.to_i else strip_tags(ic.iconv(value + ' ')[0..-2]) end end end end end
Version data entries
96 entries across 96 versions & 1 rubygems