Class: Codeqa::FakeERB

Inherits:
ERB
  • Object
show all
Defined in:
lib/codeqa/fake_erb.rb

Overview

copied from ERB throws away all the erb stuff so only html remains rubocop:disable MethodLength, LineLength, CyclomaticComplexity, BlockNesting

Defined Under Namespace

Classes: Compiler

Instance Method Summary collapse

Constructor Details

#initialize(str, safe_level = nil, trim_mode = nil, eoutvar = '_erbout', compiler_class = FakeERB::Compiler) ⇒ FakeERB

Returns a new instance of FakeERB.



7
8
9
10
11
12
13
# File 'lib/codeqa/fake_erb.rb', line 7

def initialize(str, safe_level=nil, trim_mode=nil, eoutvar='_erbout', compiler_class=FakeERB::Compiler)
  @safe_level = safe_level
  compiler = compiler_class.new(trim_mode)
  set_eoutvar(compiler, eoutvar)
  @src = compiler.compile(str)
  @filename = nil
end