Class: Prawnto::TemplateHandlers::Raw

Inherits:
Base
  • Object
show all
Defined in:
lib/prawnto/template_handlers/raw.rb

Constant Summary collapse

GENERATE_REGULAR_EXPRESSION =

attr_reader :run_environment

/^\s*Prawn\:\:Document\.generate(\(?)(.*?)(\,(.*))?(\s*\)?\s+do(.*?))$/m
RENDER_FILE_REGULAR_EXPRESSION =
/(\w+)\.render_file\(?(.*?)\)?\s*$/

Class Method Summary collapse

Methods inherited from Base

#compile

Class Method Details

.call(template) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/prawnto/template_handlers/raw.rb', line 4

def self.call(template)
  #TODO: what's up with filename here?  not used is it?
  source,filename = massage_template_source(template)
  "_prawnto_compile_setup;" +
#        (filename ? "@prawnto_options[:filename] = filename" : "") +
  source
end