Class: RubyPlots
- Inherits:
-
Object
- Object
- RubyPlots
- Defined in:
- lib/rubyplots.rb
Instance Method Summary collapse
-
#generatePlotsFor(data) ⇒ Object
data can be a file or directory.
-
#initialize ⇒ RubyPlots
constructor
A new instance of RubyPlots.
Constructor Details
#initialize ⇒ RubyPlots
Returns a new instance of RubyPlots.
16 17 |
# File 'lib/rubyplots.rb', line 16 def initialize end |
Instance Method Details
#generatePlotsFor(data) ⇒ Object
data can be a file or directory
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/rubyplots.rb', line 20 def generatePlotsFor(data) dataPath = File.absolute_path(data) tempLatexDir = createTempDirectoryFor dataPath puts "RubyPlots: created temporary working directory '#{tempLatexDir}'." @orchestrator = Orchestrator.new(tempLatexDir) @filesFound = 0 if File.directory? dataPath checkTypeAndGenerateForDir dataPath else checkTypeAndGenerateForFile dataPath end @orchestrator.generatePlots @orchestrator.savePlotsAndCleanup tempLatexDir return {:filesFound => @filesFound} end |