Class: ChatSDK::Events::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/chat_sdk/events/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = timestamp || Time.now
end

Instance Attribute Details

#adapter_nameObject (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

#platformObject (readonly)

Returns the value of attribute platform.



6
7
8
# File 'lib/chat_sdk/events/base.rb', line 6

def platform
  @platform
end

#rawObject (readonly)

Returns the value of attribute raw.



6
7
8
# File 'lib/chat_sdk/events/base.rb', line 6

def raw
  @raw
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



6
7
8
# File 'lib/chat_sdk/events/base.rb', line 6

def timestamp
  @timestamp
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/chat_sdk/events/base.rb', line 6

def type
  @type
end