module Serenity::Generator

Public Instance Methods

render_odt(template_path, output_path = output_name(template_path)) click to toggle source
# File lib/serenity/serenity/generator.rb, line 3
def render_odt template_path, output_path = output_name(template_path)
  template = Template.new template_path, output_path
  template.process binding
end

Private Instance Methods

output_name(input) click to toggle source
# File lib/serenity/serenity/generator.rb, line 10
def output_name input
  if input =~ /(.+)\.odt\Z/
    "#{$1}_output.odt"
  else
    "#{input}_output.odt"
  end
end