Class: Latex2Image::Generator
- Inherits:
-
Object
- Object
- Latex2Image::Generator
- Defined in:
- lib/latex2image/generator.rb
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(latex, output = nil) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(latex, output = nil) ⇒ Generator
Returns a new instance of Generator.
5 6 7 8 |
# File 'lib/latex2image/generator.rb', line 5 def initialize(latex, output=nil) @latex = latex @output = output.nil? ? Tempfile.new(%w(latex2image png)) : File.new(output, 'w+') end |
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
3 4 5 |
# File 'lib/latex2image/generator.rb', line 3 def output @output end |
Instance Method Details
#generate ⇒ Object
10 11 12 13 14 15 |
# File 'lib/latex2image/generator.rb', line 10 def generate generate_dvi generate_png self end |