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.
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/imgur.rb', line 131 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.
129 130 131 |
# File 'lib/imgur.rb', line 129 def album_id @album_id end |
#description ⇒ Object
Returns the value of attribute description.
128 129 130 |
# File 'lib/imgur.rb', line 128 def description @description end |
#file ⇒ Object
Returns the value of attribute file.
126 127 128 |
# File 'lib/imgur.rb', line 126 def file @file end |
#title ⇒ Object
Returns the value of attribute title.
127 128 129 |
# File 'lib/imgur.rb', line 127 def title @title end |