lib/rabbit/theme/applier.rb in rabbit-1.0.9 vs lib/rabbit/theme/applier.rb in rabbit-2.0.0

- old
+ new

@@ -215,10 +215,11 @@ class Applier include Element include Searcher include DirtyCount + include GetText extend Forwardable logger_methods = [:debug, :info, :warning, :error, :fatal, :unknown] def_delegators(:logger, *logger_methods) @@ -613,9 +614,17 @@ tag("span", attributes, content) end def entity(key) Parser::Ext::Entity::TABLE[key] + end + + def image_element(path, properties={}) + image = Parser::Ext::Image.make_image(canvas, path, properties) + if image.nil? + raise ImageFileDoesNotExistError.new(path) + end + image end def base_directory canvas.full_path(".") end