Class: MTProto::Async::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/mtproto/async/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body:, metadata: {}) ⇒ Request

Returns a new instance of Request.



8
9
10
11
# File 'lib/mtproto/async/request.rb', line 8

def initialize(body:, metadata: {})
  @body = body
  @metadata = 
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/mtproto/async/request.rb', line 6

def body
  @body
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6
7
8
# File 'lib/mtproto/async/request.rb', line 6

def 
  @metadata
end

Instance Method Details

#keyObject



13
14
15
# File 'lib/mtproto/async/request.rb', line 13

def key
  [:key] || :default
end