class Erb::Comment::CommentCompiler

Public Class Methods

new(*) click to toggle source
Calls superclass method
# File lib/erb/comment.rb, line 18
def initialize(*)
  super
  @in_comment = false
end

Public Instance Methods

compile_etag(etag, _, scanner) click to toggle source
Calls superclass method
# File lib/erb/comment.rb, line 33
def compile_etag(etag, _, scanner)
  case etag
  when '--#>'
    scanner.stag = nil
    @in_comment = false
  else
    super unless @in_comment
  end
end
compile_stag(stag, _, scanner) click to toggle source
Calls superclass method
# File lib/erb/comment.rb, line 23
def compile_stag(stag, _, scanner)
  case stag
  when '<#--'
    scanner.stag = stag
    @in_comment = true
  else
    super
  end
end
make_scanner(src) click to toggle source
# File lib/erb/comment.rb, line 43
def make_scanner(src)
  CommentScanner.new(src, @trim_mode, @percent)
end