Class: Telegram

Inherits:
Object
  • Object
show all
Defined in:
lib/telegrams/telegram.rb

Direct Known Subclasses

Reply, RespondableTelegram

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTelegram

Returns a new instance of Telegram.



4
5
# File 'lib/telegrams/telegram.rb', line 4

def initialize()
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



2
3
4
# File 'lib/telegrams/telegram.rb', line 2

def type
  @type
end

Instance Method Details

#as_bytesObject



7
8
9
# File 'lib/telegrams/telegram.rb', line 7

def as_bytes
  [@type]
end

#max_size_in_bytesObject



11
12
13
# File 'lib/telegrams/telegram.rb', line 11

def max_size_in_bytes
  64
end