lib/hotcell/template.rb in hotcell-0.1.0 vs lib/hotcell/template.rb in hotcell-0.2.0

- old
+ new

@@ -3,19 +3,20 @@ attr_reader :source, :options def self.parse source new source, commands: Hotcell.commands, - blocks: Hotcell.blocks + blocks: Hotcell.blocks, + escape_tags: Hotcell.escape_tags end def initialize source, options = {} @source = Source.wrap(source, options.delete(:file)) @options = options end def syntax - @syntax ||= Parser.new(source, options.slice(:commands, :blocks)).parse + @syntax ||= Parser.new(source, options.slice(:commands, :blocks, :escape_tags)).parse end def render context = {} if context.is_a?(Context) syntax.render(context)