Class: String
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
106 107 108 |
# File 'lib/spix_parser/core_ext.rb', line 106 def blank? self !~ /\S/ end |
#busk_normalize ⇒ Object
110 111 112 113 114 115 116 |
# File 'lib/spix_parser/core_ext.rb', line 110 def busk_normalize if RUBY_VERSION >= '1.9' self.force_encoding(Spix::Parser::Config::ENCODING) else self end end |
#to_sha1 ⇒ Object
102 103 104 |
# File 'lib/spix_parser/core_ext.rb', line 102 def to_sha1 Digest::SHA1.hexdigest "--17f7e62310d5a2bbb9bfc535b95134ece1cb474d--#{self}" end |