Class: MTProto::Async::Request
- Inherits:
-
Object
- Object
- MTProto::Async::Request
- Defined in:
- lib/mtproto/async/request.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(body:, metadata: {}) ⇒ Request
constructor
A new instance of Request.
- #key ⇒ Object
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
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/mtproto/async/request.rb', line 6 def body @body end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/mtproto/async/request.rb', line 6 def @metadata end |
Instance Method Details
#key ⇒ Object
13 14 15 |
# File 'lib/mtproto/async/request.rb', line 13 def key [:key] || :default end |