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.



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_urlObject

Returns the value of attribute account_url.



94
95
96
# File 'lib/imgur.rb', line 94

def 
  @account_url
end

#coverObject

Returns the value of attribute cover.



91
92
93
# File 'lib/imgur.rb', line 91

def cover
  @cover
end

#cover_heightObject

Returns the value of attribute cover_height.



93
94
95
# File 'lib/imgur.rb', line 93

def cover_height
  @cover_height
end

#cover_widthObject

Returns the value of attribute cover_width.



92
93
94
# File 'lib/imgur.rb', line 92

def cover_width
  @cover_width
end

#dateObject

Returns the value of attribute date.



90
91
92
# File 'lib/imgur.rb', line 90

def date
  @date
end

#deletehashObject

Returns the value of attribute deletehash.



99
100
101
# File 'lib/imgur.rb', line 99

def deletehash
  @deletehash
end

#descriptionObject

Returns the value of attribute description.



89
90
91
# File 'lib/imgur.rb', line 89

def description
  @description
end

#idObject

Returns the value of attribute id.



87
88
89
# File 'lib/imgur.rb', line 87

def id
  @id
end

#imagesObject

Returns the value of attribute images.



101
102
103
# File 'lib/imgur.rb', line 101

def images
  @images
end

#images_countObject

Returns the value of attribute images_count.



100
101
102
# File 'lib/imgur.rb', line 100

def images_count
  @images_count
end

#layoutObject

Returns the value of attribute layout.



96
97
98
# File 'lib/imgur.rb', line 96

def layout
  @layout
end

Returns the value of attribute link.



98
99
100
# File 'lib/imgur.rb', line 98

def link
  @link
end

#privacyObject

Returns the value of attribute privacy.



95
96
97
# File 'lib/imgur.rb', line 95

def privacy
  @privacy
end

#titleObject

Returns the value of attribute title.



88
89
90
# File 'lib/imgur.rb', line 88

def title
  @title
end

#viewsObject

Returns the value of attribute views.



97
98
99
# File 'lib/imgur.rb', line 97

def views
  @views
end