Class: Imgur::Client::Image
- Inherits:
-
Model
- Object
- Cistern::Model
- Model
- Imgur::Client::Image
show all
- Defined in:
- lib/imgur/models/image.rb
Instance Method Summary
collapse
Methods inherited from Model
assoc_accessor, assoc_reader, assoc_writer
Instance Method Details
30
31
32
33
34
|
# File 'lib/imgur/models/image.rb', line 30
def
type = is_album ? "album" : "image"
data = connection.(type: type, id: id).body["data"]
connection..load(data)
end
|
#delete ⇒ Object
25
26
27
28
|
# File 'lib/imgur/models/image.rb', line 25
def delete
data = connection.delete_image(deletehash).body
connection.basic_responses.new(data)
end
|
#open_in_browser ⇒ Object
21
22
23
|
# File 'lib/imgur/models/image.rb', line 21
def open_in_browser
Launchy.open(link)
end
|