1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/application/dummy_erb_compiler.rb
2019-03-11 17:49:27 -04:00

19 lines
449 B
Ruby

# frozen_string_literal: true
# These classes are used to strip out the ERB configuration
# values so we can evaluate the database.yml without evaluating
# the ERB values.
class DummyERB < ERB # :nodoc:
def make_compiler(trim_mode)
DummyCompiler.new trim_mode
end
end
class DummyCompiler < ERB::Compiler # :nodoc:
def compile_content(stag, out)
case stag
when '<%='
out.push "_erbout << 'dummy_compiler'"
end
end
end