Class: XapiScraper::Models::Components::PostTweetData

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

Overview

Post tweet response data

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(tweet_id: nil, user_id: nil, code: 200) ⇒ PostTweetData

Returns a new instance of PostTweetData.



34
35
36
37
38
# File 'lib/xapi_scraper/models/components/posttweetdata.rb', line 34

def initialize(tweet_id: nil, user_id: nil, code: 200)
  @tweet_id = tweet_id
  @user_id = user_id
  @code = code
end

Instance Method Details

#==(other) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/xapi_scraper/models/components/posttweetdata.rb', line 41

def ==(other)
  return false unless other.is_a?(self.class)
  return false unless @tweet_id == other.tweet_id
  return false unless @user_id == other.user_id
  return false unless @code == other.code
  true
end