Class: WeebSh::WeebImage

Inherits:
PreviewImage show all
Defined in:
lib/weeb/data.rb

Overview

Represents an image for toph

Instance Attribute Summary collapse

Attributes inherited from PreviewImage

#file_type, #type, #url

Attributes included from IDObject

#id

Instance Method Summary collapse

Methods included from IDObject

#==

Instance Attribute Details

#accountString (readonly) Also known as: uploader, author


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

def 
  @account
end

#hiddentrue, false (readonly) Also known as: hidden?


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

def hidden
  @hidden
end

#mime_typeString (readonly)


86
87
88
# File 'lib/weeb/data.rb', line 86

def mime_type
  @mime_type
end

#nsfwtrue, false (readonly) Also known as: nsfw?


82
83
84
# File 'lib/weeb/data.rb', line 82

def nsfw
  @nsfw
end

#sourceString? (readonly)


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

def source
  @source
end

#tagsArray<String> (readonly)


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

def tags
  @tags
end

Instance Method Details

#add_tag(tag) ⇒ Object

Add a tag to the image


133
134
135
# File 'lib/weeb/data.rb', line 133

def add_tag(tag)
  @interface.add_tags_to_image(self, [tag])
end

#add_tags(tags) ⇒ Object

Add tags to the image


121
122
123
# File 'lib/weeb/data.rb', line 121

def add_tags(tags)
  @interface.add_tags_to_image(self, tags)
end

#deleteObject Also known as: remove

Delete this image


144
145
146
# File 'lib/weeb/data.rb', line 144

def delete
  @interface.delete_image(self)
end

#remove_tag(tag) ⇒ Object

Remove a tag to the image


139
140
141
# File 'lib/weeb/data.rb', line 139

def remove_tag(tag)
  @interface.remove_tags_to_image(self, [tag])
end

#remove_tags(tags) ⇒ Object

Remove tags from the image


127
128
129
# File 'lib/weeb/data.rb', line 127

def remove_tags(tags)
  @interface.remove_tags_to_image(self, tags)
end