Ezprint::PdfHelper

Public Class Methods

included(base) click to toggle source
# File lib/ezprint/pdf_helper.rb, line 3
def self.included(base)
  base.class_eval do
    alias_method_chain :render, :ezprint
  end
end

Public Instance Methods

render_with_ezprint(options = nil, *args, &block) click to toggle source
# File lib/ezprint/pdf_helper.rb, line 9
def render_with_ezprint(options = nil, *args, &block)
  if options.is_a?(Symbol) or options.nil? or options[:pdf].nil?
    render_without_ezprint(options, *args, &block)
  else
    options[:name] ||= options.delete(:pdf)
    make_and_send_pdf(options.delete(:name), options)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.