Class: Printaura::Image
- Inherits:
-
Object
- Object
- Printaura::Image
- Defined in:
- lib/printaura/image.rb
Instance Attribute Summary collapse
-
#image_id ⇒ Object
Returns the value of attribute image_id.
Instance Method Summary collapse
-
#initialize(filename) ⇒ Image
constructor
A new instance of Image.
Constructor Details
#initialize(filename) ⇒ Image
7 8 9 10 11 12 13 14 |
# File 'lib/printaura/image.rb', line 7 def initialize(filename) if filename.is_a?(String) filename = File.new(filename) end result = Api.uploadimage({file: filename}) @image_id = result["results"]["image_id"] end |
Instance Attribute Details
#image_id ⇒ Object
Returns the value of attribute image_id.
5 6 7 |
# File 'lib/printaura/image.rb', line 5 def image_id @image_id end |