Class: RubyPost::PicturePrecompiler

Inherits:
Object
  • Object
show all
Defined in:
lib/objects.rb

Overview

stores the macros that particular drawbles need. This should really be a private class.

Instance Method Summary collapse

Constructor Details

#initializePicturePrecompiler

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

#compileObject



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