Class: WeebSh::PreviewImage

Inherits:
Object
  • Object
show all
Includes:
IDObject
Defined in:
lib/weeb/data.rb

Overview

Represents a preview image for toph

Direct Known Subclasses

WeebImage

Instance Attribute Summary collapse

Attributes included from IDObject

#id

Instance Method Summary collapse

Methods included from IDObject

#==

Instance Attribute Details

#file_typeString (readonly)

Returns the file extension of the image.

Returns:

  • (String)

    the file extension of the image


56
57
58
# File 'lib/weeb/data.rb', line 56

def file_type
  @file_type
end

#typeSymbol (readonly)

Returns the type of image this is.

Returns:

  • (Symbol)

    the type of image this is


53
54
55
# File 'lib/weeb/data.rb', line 53

def type
  @type
end

#urlString (readonly)

Returns the url of the image.

Returns:

  • (String)

    the url of the image


59
60
61
# File 'lib/weeb/data.rb', line 59

def url
  @url
end

Instance Method Details

#inspectObject


70
71
72
# File 'lib/weeb/data.rb', line 70

def inspect
  "#<WeebSh::PreviewImage @url=#{@url.inspect} @type=#{@type.inspect}>"
end