Module: TChart
- Defined in:
- lib/tchart.rb,
lib/tchart/version.rb,
lib/tchart/model/bar.rb,
lib/tchart/model/chart.rb,
lib/tchart/model/label.rb,
lib/tchart/model/layout.rb,
lib/tchart/model/y_item.rb,
lib/tchart/model/settings.rb,
lib/tchart/model/grid_line.rb,
lib/tchart/model/separator.rb,
lib/tchart/model/coordinate.rb,
lib/tchart/lang/tchart_error.rb,
lib/tchart/process/tex_writer.rb,
lib/tchart/process/data_parser.rb,
lib/tchart/process/data_reader.rb,
lib/tchart/process/tex_builder.rb,
lib/tchart/process/items_parser.rb,
lib/tchart/process/chart_builder.rb,
lib/tchart/process/layout_builder.rb,
lib/tchart/model/command_line_args.rb,
lib/tchart/process/settings_parser.rb,
lib/tchart/process/command_line_parser.rb
Defined Under Namespace
Modules: DataReader, TeXWriter Classes: Bar, Chart, ChartBuilder, CommandLineArgs, CommandLineParser, Coordinate, DataParser, GridLine, ItemsParser, Label, Layout, LayoutBuilder, Separator, Settings, SettingsParser, TChartError, TeXBuilder, YItem
Constant Summary collapse
- Version =
"1.0.2"
Class Method Summary collapse
-
.run(argv) ⇒ Object
Program entry point.
Class Method Details
.run(argv) ⇒ Object
Program entry point. Responsible for running the various steps required to generate TikZ code that renders a chart. Also responsible for reporting errors.
12 13 14 15 16 17 18 19 |
# File 'lib/tchart.rb', line 12 def self.run(argv) args, errors = CommandLineParser.parse(argv) ; abort_if errors settings, items, errors = DataReader.read(args.data_filename) ; abort_if errors layout, errors = LayoutBuilder.build(settings, items) ; abort_if errors chart = ChartBuilder.build(layout, items) tex = chart.render TeXWriter.write(args.tex_filename, tex) end |