module SkullIsland::Helpers::CliErb

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

Public Instance Methods

erb_preprocess(input) click to toggle source
# 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) click to toggle source

At this phase, we want to leave this alone…

# File lib/skull_island/helpers/cli_erb.rb, line 15
def lookup(type, value, raw = false)
  "<%= lookup :#{type}, '#{value}', #{raw} %>"
end