Class: Formatter::Double

Inherits:
Delimited show all
Defined in:
lib/livetext/formatter.rb

Instance Method Summary collapse

Methods inherited from Delimited

#buffer, #cdata, #eol?, #escape?, #front, #grab, #grab_terminator, #handle, #initial, #looping, #marker?, process, #space?, #space_marker?, #status, #wrap

Constructor Details

#initialize(str, sigil, tag) ⇒ Double

Returns a new instance of Double.



193
194
195
196
197
# File 'lib/livetext/formatter.rb', line 193

def initialize(str, sigil, tag)
  super
  # Convention: marker is "**", sigil is "*"
  @marker = sigil + sigil
end

Instance Method Details

#terminated?Boolean

Returns:

  • (Boolean)


199
200
201
202
# File 'lib/livetext/formatter.rb', line 199

def terminated?
  terms = [" ", ".", ","]
  terms.include?(front)
end