Class: Traptcha::Image
- Inherits:
-
Object
- Object
- Traptcha::Image
- Defined in:
- lib/traptcha/image.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(text, options = {}) ⇒ Image
constructor
A new instance of Image.
- #output ⇒ Object
- #save(path) ⇒ Object
Constructor Details
Instance Method Details
#output ⇒ Object
16 17 18 19 |
# File 'lib/traptcha/image.rb', line 16 def output generate @canvas end |
#save(path) ⇒ Object
12 13 14 |
# File 'lib/traptcha/image.rb', line 12 def save(path) output.write(File.join(path, @text + ".png")) end |