Class: Inch::Badge::Image::SVG
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Inch::Badge::Image::Base
Instance Method Details
#save ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/inch/badge/image/svg.rb', line 7 def save add_n_grade! if empty_badge? template_content = File.read( Config.image_path(badge_template) ) renderer = ERB.new(template_content) output = renderer.result(binding) File.open(@filename, 'w') {|f| f.write(output) } end |