Module: AdHocTemplate
- Defined in:
- lib/ad_hoc_template.rb,
lib/ad_hoc_template/parser.rb,
lib/ad_hoc_template/version.rb,
lib/ad_hoc_template/record_reader.rb,
lib/ad_hoc_template/command_line_interface.rb
Defined Under Namespace
Modules: RecordReader Classes: CommandLineInterface, DataLoader, DefaultTagFormatter, Parser
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.convert(record_data, template, tag_type = :default, data_format = :default, tag_formatter = DefaultTagFormatter.new) ⇒ Object
86 87 88 89 90 91 |
# File 'lib/ad_hoc_template.rb', line 86 def self.convert(record_data, template, tag_type=:default, data_format=:default, tag_formatter=DefaultTagFormatter.new) tree = Parser.parse(template, tag_type) record = RecordReader.read_record(record_data, data_format) DataLoader.format(tree, record, tag_formatter) end |