Class: Sticker
Overview
This object represents a sticker. Extends from TFile
Instance Method Summary collapse
-
#animated? ⇒ Boolean
True, if the sticker is animated.
-
#emoji ⇒ Object
Optional.
-
#height ⇒ Object
Sticker height.
-
#initialize(sticker) ⇒ Sticker
constructor
:nodoc:.
- #mask_position ⇒ Object
-
#set_name ⇒ Object
Optional.
-
#thumb ⇒ Object
Optional.
-
#width ⇒ Object
Sticker width.
Methods inherited from TFile
#file_id, #file_path, #file_size, #file_unique_id
Constructor Details
#initialize(sticker) ⇒ Sticker
:nodoc:
12 13 14 |
# File 'lib/objects/sticker.rb', line 12 def initialize(sticker) # :nodoc: super(sticker) end |
Instance Method Details
#animated? ⇒ Boolean
True, if the sticker is animated
27 28 29 |
# File 'lib/objects/sticker.rb', line 27 def animated? @sticker.is_animated end |
#emoji ⇒ Object
Optional. Emoji associated with the sticker
40 41 42 |
# File 'lib/objects/sticker.rb', line 40 def emoji @sticker.emoji end |
#height ⇒ Object
Sticker height
22 23 24 |
# File 'lib/objects/sticker.rb', line 22 def height @sticker.height end |
#mask_position ⇒ Object
49 50 51 52 53 54 |
# File 'lib/objects/sticker.rb', line 49 def mask_position msk_pos = @sticker.mask_position return MaskPosition.new(msk_pos) if msk_pos false end |
#set_name ⇒ Object
Optional. Name of the sticker set to which the sticker belongs.
45 46 47 |
# File 'lib/objects/sticker.rb', line 45 def set_name @sticker.set_name end |
#thumb ⇒ Object
Optional. Sticker thumbnail in the .WEBP or .JPG format
32 33 34 35 36 37 |
# File 'lib/objects/sticker.rb', line 32 def thumb tmb = @sticker.thumb return PhotoSize.new(tmb) if tmb false end |
#width ⇒ Object
Sticker width
17 18 19 |
# File 'lib/objects/sticker.rb', line 17 def width @file.width end |