This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script will take the file book.html.erb and parse it. When it encounters | |
# <%= import('your_file.html.erb') %> it will parse the file and stream | |
# it into the parent erb file. | |
require "erb" | |
class ErbImportSubtemplate | |
def self.import(file) | |
# Parse the source erb file |