Class: RubyPost::PicturePrecompiler
Overview
stores the macros that particular drawbles need. This should really be a private class.
Instance Method Summary collapse
- #add_picture(s) ⇒ Object
- #compile ⇒ Object
-
#initialize ⇒ PicturePrecompiler
constructor
A new instance of PicturePrecompiler.
Constructor Details
#initialize ⇒ PicturePrecompiler
Returns a new instance of PicturePrecompiler.
38 39 40 |
# File 'lib/objects.rb', line 38 def initialize @pictures = Array.new end |
Instance Method Details
#add_picture(s) ⇒ Object
42 43 44 |
# File 'lib/objects.rb', line 42 def add_picture(s) @pictures.push(s) end |
#compile ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/objects.rb', line 46 def compile str = "picture " + @@org_picture + ";\n" + @@org_picture + " := currentpicture;\n" @pictures.each do |p| str = str + p.precompile + "\n" end str end |