Class: Bollettino::Generator
- Inherits:
-
Object
- Object
- Bollettino::Generator
- Defined in:
- lib/bollettino/generator.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #generate!(slip, path) ⇒ Object
-
#initialize(options = {}) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(options = {}) ⇒ Generator
Returns a new instance of Generator.
4 5 6 |
# File 'lib/bollettino/generator.rb', line 4 def initialize( = {}) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
2 3 4 |
# File 'lib/bollettino/generator.rb', line 2 def @options end |
Instance Method Details
#generate!(slip, path) ⇒ Object
8 9 10 11 12 |
# File 'lib/bollettino/generator.rb', line 8 def generate!(slip, path) image = MiniMagick::Image.open(File.('../../../assets/slip.png', __FILE__)) Bollettino::Renderer::SlipRenderer.render(image, slip) image.write path end |