Class: TBMX::WhitespaceToken

Inherits:
StringToken show all
Defined in:
lib/tbmx.rb

Constant Summary collapse

FULL_MATCH_REGEX =
/\A\s+\z/
FRONT_MATCH_REGEX =
/\A\s+/
COUNT_REGEX =
/\S/

Instance Attribute Summary

Attributes inherited from StringToken

#text

Instance Method Summary collapse

Methods inherited from StringToken

count_regex, front_match_regex, full_match_regex, #initialize, matches?

Methods inherited from Token

matches?

Constructor Details

This class inherits a constructor from TBMX::StringToken

Instance Method Details

#to_htmlObject



155
156
157
# File 'lib/tbmx.rb', line 155

def to_html
  " " # Replace all whitespace tokens with a single space.
end

#whitespaceObject



151
152
153
# File 'lib/tbmx.rb', line 151

def whitespace
  text
end