lib/exclaim/ui.rb in ruby-exclaim-0.0.0 vs lib/exclaim/ui.rb in ruby-exclaim-0.1.0

- old
+ new

@@ -2,12 +2,13 @@ module Exclaim class Ui attr_reader :implementation_map, :parsed_ui, :renderer - def initialize(implementation_map: Exclaim::Implementations.example_implementation_map) + def initialize(implementation_map: Exclaim::Implementations.example_implementation_map, should_escape_html: true) @implementation_map = Exclaim::ImplementationMap.parse!(implementation_map) + @should_escape_html = should_escape_html rescue Exclaim::Error raise rescue StandardError => e e.extend(Exclaim::InternalError) raise @@ -64,10 +65,10 @@ private def parsed_ui=(value) @parsed_ui = value - @renderer = Exclaim::Renderer.new(@parsed_ui) + @renderer = Exclaim::Renderer.new(@parsed_ui, @should_escape_html) end def bind_paths(config_value, accumulator) case config_value in Hash => hash