Class: XapiScraper::Models::Components::DmHistoryV3Data

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/xapi_scraper/models/components/dmhistoryv3data.rb

Overview

DM history payload for XChat v3

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(conversation_id:, has_more:, messages:) ⇒ DmHistoryV3Data

Returns a new instance of DmHistoryV3Data.



37
38
39
40
41
# File 'lib/xapi_scraper/models/components/dmhistoryv3data.rb', line 37

def initialize(conversation_id:, has_more:, messages:)
  @conversation_id = conversation_id
  @has_more = has_more
  @messages = messages
end

Instance Method Details

#==(other) ⇒ Object



44
45
46
47
48
49
50
# File 'lib/xapi_scraper/models/components/dmhistoryv3data.rb', line 44

def ==(other)
  return false unless other.is_a?(self.class)
  return false unless @conversation_id == other.conversation_id
  return false unless @has_more == other.has_more
  return false unless @messages == other.messages
  true
end