The parent class for all three types of HTML tokens
Initialize the token based on the raw text
# File lib/openid/yadis/htmltokenizer.rb, line 177 def initialize(text) @raw = text end
Compare to another based on the raw source
# File lib/openid/yadis/htmltokenizer.rb, line 196 def ==(other) raw == other.to_s end
By default tokens have no text representation
# File lib/openid/yadis/htmltokenizer.rb, line 187 def text "" end
By default, return exactly the string used to create the text
# File lib/openid/yadis/htmltokenizer.rb, line 182 def to_s raw end
# File lib/openid/yadis/htmltokenizer.rb, line 191 def trimmed_text text.strip.gsub(%r\s+/, " ") end