module Erubis::NoCodeEnhancer

remove code and leave text, especially useful when validating HTML tags.

ex.

$ erubis -s -E NoCode file.eruby | tidy -errors

this is language independent.

Public Instance Methods

add_expr(src, code, indicator) click to toggle source
# File lib/erubis/enhancer.rb, line 317
def add_expr(src, code, indicator)
  src << "\n" * code.count("\n")
end
add_postamble(src) click to toggle source
# File lib/erubis/enhancer.rb, line 310
def add_postamble(src)
end
add_preamble(src) click to toggle source
# File lib/erubis/enhancer.rb, line 307
def add_preamble(src)
end
add_stmt(src, code) click to toggle source
# File lib/erubis/enhancer.rb, line 321
def add_stmt(src, code)
  src << "\n" * code.count("\n")
end
add_text(src, text) click to toggle source
# File lib/erubis/enhancer.rb, line 313
def add_text(src, text)
  src << text
end