Class: Imgur::LocalImage
- Inherits:
-
Object
- Object
- Imgur::LocalImage
- Defined in:
- lib/imgur.rb
Overview
Represents an image stored on the computer
Instance Attribute Summary collapse
-
#album_id ⇒ Object
Returns the value of attribute album_id.
-
#description ⇒ Object
Returns the value of attribute description.
-
#file ⇒ Object
Returns the value of attribute file.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ LocalImage
constructor
A new instance of LocalImage.
Constructor Details
#initialize(file, options = {}) ⇒ LocalImage
Returns a new instance of LocalImage.
221 222 223 224 225 226 227 228 229 230 |
# File 'lib/imgur.rb', line 221 def initialize(file, ={}) if file.is_a? String @file = File.open file, 'rb' else @file = file end @title = [:title] @description = [:description] @album_id = [:album_id] end |
Instance Attribute Details
#album_id ⇒ Object
Returns the value of attribute album_id.
219 220 221 |
# File 'lib/imgur.rb', line 219 def album_id @album_id end |
#description ⇒ Object
Returns the value of attribute description.
219 220 221 |
# File 'lib/imgur.rb', line 219 def description @description end |
#file ⇒ Object
Returns the value of attribute file.
219 220 221 |
# File 'lib/imgur.rb', line 219 def file @file end |
#title ⇒ Object
Returns the value of attribute title.
219 220 221 |
# File 'lib/imgur.rb', line 219 def title @title end |