module Caracal::View
Public Instance Methods
docx()
click to toggle source
# File lib/caracal/view.rb, line 3 def docx @docx ||= Caracal::Document.new end
method_missing(method_name, *arguments, &block)
click to toggle source
Calls superclass method
# File lib/caracal/view.rb, line 22 def method_missing(method_name, *arguments, &block) return super unless docx.respond_to?(method_name) docx.send(method_name, *arguments, &block) end
render()
click to toggle source
# File lib/caracal/view.rb, line 12 def render buffer = docx.render buffer.rewind buffer.sysread end
respond_to_missing?(method_name, _include_private = false)
click to toggle source
# File lib/caracal/view.rb, line 28 def respond_to_missing?(method_name, _include_private = false) docx.respond_to?(method_name) end
save_as(name)
click to toggle source
# File lib/caracal/view.rb, line 7 def save_as(name) file_name(name) save end
update(&block)
click to toggle source
# File lib/caracal/view.rb, line 18 def update(&block) instance_eval(&block) end