Class: Imgur::Album

Inherits:
Object
  • Object
show all
Defined in:
lib/imgur.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_urlObject

Returns the value of attribute account_url.



186
187
188
# File 'lib/imgur.rb', line 186

def 
  @account_url
end

#coverObject

Returns the value of attribute cover.



183
184
185
# File 'lib/imgur.rb', line 183

def cover
  @cover
end

#cover_heightObject

Returns the value of attribute cover_height.



185
186
187
# File 'lib/imgur.rb', line 185

def cover_height
  @cover_height
end

#cover_widthObject

Returns the value of attribute cover_width.



184
185
186
# File 'lib/imgur.rb', line 184

def cover_width
  @cover_width
end

#dateObject

Returns the value of attribute date.



182
183
184
# File 'lib/imgur.rb', line 182

def date
  @date
end

#deletehashObject

Returns the value of attribute deletehash.



191
192
193
# File 'lib/imgur.rb', line 191

def deletehash
  @deletehash
end

#descriptionObject

Returns the value of attribute description.



181
182
183
# File 'lib/imgur.rb', line 181

def description
  @description
end

#idObject

Returns the value of attribute id.



179
180
181
# File 'lib/imgur.rb', line 179

def id
  @id
end

#imagesObject

Returns the value of attribute images.



193
194
195
# File 'lib/imgur.rb', line 193

def images
  @images
end

#images_countObject

Returns the value of attribute images_count.



192
193
194
# File 'lib/imgur.rb', line 192

def images_count
  @images_count
end

#layoutObject

Returns the value of attribute layout.



188
189
190
# File 'lib/imgur.rb', line 188

def layout
  @layout
end

Returns the value of attribute link.



190
191
192
# File 'lib/imgur.rb', line 190

def link
  @link
end

#privacyObject

Returns the value of attribute privacy.



187
188
189
# File 'lib/imgur.rb', line 187

def privacy
  @privacy
end

#titleObject

Returns the value of attribute title.



180
181
182
# File 'lib/imgur.rb', line 180

def title
  @title
end

#viewsObject

Returns the value of attribute views.



189
190
191
# File 'lib/imgur.rb', line 189

def views
  @views
end