Class: Prawnto::TemplateHandlers::Raw

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

Constant Summary

GENERATE_REGULAR_EXPRESSION =

attr_reader :run_environment

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

Instance Method Summary collapse

Instance Method Details

#compile(template) ⇒ Object



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

def compile(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