Class: Imgur::Album
- Inherits:
-
Object
- Object
- Imgur::Album
- Defined in:
- lib/imgur.rb
Instance Attribute Summary collapse
-
#account_url ⇒ Object
Returns the value of attribute account_url.
-
#cover ⇒ Object
Returns the value of attribute cover.
-
#cover_height ⇒ Object
Returns the value of attribute cover_height.
-
#cover_width ⇒ Object
Returns the value of attribute cover_width.
-
#date ⇒ Object
Returns the value of attribute date.
-
#deletehash ⇒ Object
Returns the value of attribute deletehash.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#images ⇒ Object
Returns the value of attribute images.
-
#images_count ⇒ Object
Returns the value of attribute images_count.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#link ⇒ Object
Returns the value of attribute link.
-
#privacy ⇒ Object
Returns the value of attribute privacy.
-
#title ⇒ Object
Returns the value of attribute title.
-
#views ⇒ Object
Returns the value of attribute views.
Instance Method Summary collapse
-
#initialize(data) ⇒ Album
constructor
A new instance of Album.
Constructor Details
#initialize(data) ⇒ Album
Returns a new instance of Album.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/imgur.rb', line 195 def initialize(data) @id = data['id'] @title = data['title'] @description = data['description'] @date = Time.at data['datetime'] @cover = data['cover'] @cover_width = data['cover_width'] @account_url = data['account_url'] @privacy = data['privacy'] @layout = data['layout'] @views = data['views'] @link = data['link'] @deletehash = data['deletehash'] @images_count = data['images_count'] @images = [] data['images'].each do |img| @images << Image.new(img) end end |
Instance Attribute Details
#account_url ⇒ Object
Returns the value of attribute account_url.
186 187 188 |
# File 'lib/imgur.rb', line 186 def account_url @account_url end |
#cover ⇒ Object
Returns the value of attribute cover.
183 184 185 |
# File 'lib/imgur.rb', line 183 def cover @cover end |
#cover_height ⇒ Object
Returns the value of attribute cover_height.
185 186 187 |
# File 'lib/imgur.rb', line 185 def cover_height @cover_height end |
#cover_width ⇒ Object
Returns the value of attribute cover_width.
184 185 186 |
# File 'lib/imgur.rb', line 184 def cover_width @cover_width end |
#date ⇒ Object
Returns the value of attribute date.
182 183 184 |
# File 'lib/imgur.rb', line 182 def date @date end |
#deletehash ⇒ Object
Returns the value of attribute deletehash.
191 192 193 |
# File 'lib/imgur.rb', line 191 def deletehash @deletehash end |
#description ⇒ Object
Returns the value of attribute description.
181 182 183 |
# File 'lib/imgur.rb', line 181 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
179 180 181 |
# File 'lib/imgur.rb', line 179 def id @id end |
#images ⇒ Object
Returns the value of attribute images.
193 194 195 |
# File 'lib/imgur.rb', line 193 def images @images end |
#images_count ⇒ Object
Returns the value of attribute images_count.
192 193 194 |
# File 'lib/imgur.rb', line 192 def images_count @images_count end |
#layout ⇒ Object
Returns the value of attribute layout.
188 189 190 |
# File 'lib/imgur.rb', line 188 def layout @layout end |
#link ⇒ Object
Returns the value of attribute link.
190 191 192 |
# File 'lib/imgur.rb', line 190 def link @link end |
#privacy ⇒ Object
Returns the value of attribute privacy.
187 188 189 |
# File 'lib/imgur.rb', line 187 def privacy @privacy end |
#title ⇒ Object
Returns the value of attribute title.
180 181 182 |
# File 'lib/imgur.rb', line 180 def title @title end |
#views ⇒ Object
Returns the value of attribute views.
189 190 191 |
# File 'lib/imgur.rb', line 189 def views @views end |