Method: ERB::Formatter#indented

Defined in:
lib/erb/formatter.rb

#indented(string, strip: true) ⇒ Object



221
222
223
224
225
# File 'lib/erb/formatter.rb', line 221

def indented(string, strip: true)
  string = string.strip if strip
  indent = "  " * tag_stack.size
  "\n#{indent}#{string}"
end