Class: Diligence::Types::Updates::MessageUpdate
- Inherits:
-
Object
- Object
- Diligence::Types::Updates::MessageUpdate
- Defined in:
- lib/diligence/types/updates/message_update.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(raw) ⇒ MessageUpdate
constructor
A new instance of MessageUpdate.
- #type ⇒ Object
Constructor Details
#initialize(raw) ⇒ MessageUpdate
Returns a new instance of MessageUpdate.
11 12 13 14 15 16 |
# File 'lib/diligence/types/updates/message_update.rb', line 11 def initialize(raw) @raw = raw @id = raw.fetch('update_id') = Types::Message.new(raw.fetch('message')) if raw['message'] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
9 10 11 |
# File 'lib/diligence/types/updates/message_update.rb', line 9 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'lib/diligence/types/updates/message_update.rb', line 9 def end |
Instance Method Details
#type ⇒ Object
18 19 20 21 22 |
# File 'lib/diligence/types/updates/message_update.rb', line 18 def type return :message if @raw['message'] :unknown end |