[Source]
# File lib/ankusa/extensions.rb, line 4 def numeric? true if Float(self) rescue false end
# File lib/ankusa/extensions.rb, line 8 def to_ascii # from http://www.jroller.com/obie/tags/unicode converter = Iconv.new('ASCII//IGNORE//TRANSLIT', 'UTF-8') converter.iconv(self).unpack('U*').select { |cp| cp < 127 }.pack('U*') rescue "" end
[Validate]