Class: ChatSDK::Events::Base
- Inherits:
-
Object
- Object
- ChatSDK::Events::Base
- Defined in:
- lib/chat_sdk/events/base.rb
Direct Known Subclasses
Action, DirectMessage, Mention, Reaction, SlashCommand, SubscribedMessage
Instance Attribute Summary collapse
-
#adapter_name ⇒ Object
readonly
Returns the value of attribute adapter_name.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, platform:, adapter_name:, raw: nil, timestamp: nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(type:, platform:, adapter_name:, raw: nil, timestamp: nil) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 13 14 |
# File 'lib/chat_sdk/events/base.rb', line 8 def initialize(type:, platform:, adapter_name:, raw: nil, timestamp: nil) @type = type @platform = platform @adapter_name = adapter_name @raw = raw @timestamp = || Time.now end |
Instance Attribute Details
#adapter_name ⇒ Object (readonly)
Returns the value of attribute adapter_name.
6 7 8 |
# File 'lib/chat_sdk/events/base.rb', line 6 def adapter_name @adapter_name end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
6 7 8 |
# File 'lib/chat_sdk/events/base.rb', line 6 def platform @platform end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
6 7 8 |
# File 'lib/chat_sdk/events/base.rb', line 6 def raw @raw end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
6 7 8 |
# File 'lib/chat_sdk/events/base.rb', line 6 def @timestamp end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/chat_sdk/events/base.rb', line 6 def type @type end |