Module: CMSScanner::Formatter::Buffer

Included in:
Json
Defined in:
lib/cms_scanner/formatter/buffer.rb

Overview

Module used to output the rendered views into a buffer and beautify it a the end of the scan

Instance Method Summary collapse

Instance Method Details

#bufferObject



12
13
14
# File 'lib/cms_scanner/formatter/buffer.rb', line 12

def buffer
  @buffer ||= +''
end

#output(tpl, vars = {}, controller_name = nil) ⇒ Object



8
9
10
# File 'lib/cms_scanner/formatter/buffer.rb', line 8

def output(tpl, vars = {}, controller_name = nil)
  buffer << render(tpl, vars, controller_name).encode('UTF-8', invalid: :replace, undef: :replace)
end