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.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/imgur.rb', line 103 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.
94 95 96 |
# File 'lib/imgur.rb', line 94 def account_url @account_url end |
#cover ⇒ Object
Returns the value of attribute cover.
91 92 93 |
# File 'lib/imgur.rb', line 91 def cover @cover end |
#cover_height ⇒ Object
Returns the value of attribute cover_height.
93 94 95 |
# File 'lib/imgur.rb', line 93 def cover_height @cover_height end |
#cover_width ⇒ Object
Returns the value of attribute cover_width.
92 93 94 |
# File 'lib/imgur.rb', line 92 def cover_width @cover_width end |
#date ⇒ Object
Returns the value of attribute date.
90 91 92 |
# File 'lib/imgur.rb', line 90 def date @date end |
#deletehash ⇒ Object
Returns the value of attribute deletehash.
99 100 101 |
# File 'lib/imgur.rb', line 99 def deletehash @deletehash end |
#description ⇒ Object
Returns the value of attribute description.
89 90 91 |
# File 'lib/imgur.rb', line 89 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
87 88 89 |
# File 'lib/imgur.rb', line 87 def id @id end |
#images ⇒ Object
Returns the value of attribute images.
101 102 103 |
# File 'lib/imgur.rb', line 101 def images @images end |
#images_count ⇒ Object
Returns the value of attribute images_count.
100 101 102 |
# File 'lib/imgur.rb', line 100 def images_count @images_count end |
#layout ⇒ Object
Returns the value of attribute layout.
96 97 98 |
# File 'lib/imgur.rb', line 96 def layout @layout end |
#link ⇒ Object
Returns the value of attribute link.
98 99 100 |
# File 'lib/imgur.rb', line 98 def link @link end |
#privacy ⇒ Object
Returns the value of attribute privacy.
95 96 97 |
# File 'lib/imgur.rb', line 95 def privacy @privacy end |
#title ⇒ Object
Returns the value of attribute title.
88 89 90 |
# File 'lib/imgur.rb', line 88 def title @title end |
#views ⇒ Object
Returns the value of attribute views.
97 98 99 |
# File 'lib/imgur.rb', line 97 def views @views end |