Class: XapiScraper::Models::Components::GetQuotesQuery

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(tweet_id:, count:, sort_by: Models::Components::GetQuotesQuerySortBy::TOP) ⇒ GetQuotesQuery

Returns a new instance of GetQuotesQuery.



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

def initialize(tweet_id:, count:, sort_by: Models::Components::GetQuotesQuerySortBy::TOP)
  @tweet_id = tweet_id
  @count = count
  @sort_by = sort_by
end

Instance Method Details

#==(other) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/xapi_scraper/models/components/getquotesquery.rb', line 49

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