Module: SkullIsland::Helpers::CliErb

Included in:
CLI
Defined in:
lib/skull_island/helpers/cli_erb.rb

Overview

Performs a simple, first pass ERb preprocess on the entire input file for the CLI

Instance Method Summary collapse

Instance Method Details

#erb_preprocess(input) ⇒ Object



7
8
9
10
11
12
# File 'lib/skull_island/helpers/cli_erb.rb', line 7

def erb_preprocess(input)
  warn '[INFO] Preprocessing template' if options['verbose']
  # rubocop:disable Security/Eval
  eval(Erubi::Engine.new(input).src)
  # rubocop:enable Security/Eval
end

#lookup(type, value, raw = false) ⇒ Object

At this phase, we want to leave this alone…



15
16
17
# File 'lib/skull_island/helpers/cli_erb.rb', line 15

def lookup(type, value, raw = false)
  "<%= lookup :#{type}, '#{value}', #{raw} %>"
end