Class: XapiScraper::Models::Components::UrlModel

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(url:, expanded_url: nil, display_url: nil) ⇒ UrlModel

Returns a new instance of UrlModel.



30
31
32
33
34
# File 'lib/xapi_scraper/models/components/urlmodel.rb', line 30

def initialize(url:, expanded_url: nil, display_url: nil)
  @url = url
  @expanded_url = expanded_url
  @display_url = display_url
end

Instance Method Details

#==(other) ⇒ Object



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

def ==(other)
  return false unless other.is_a?(self.class)
  return false unless @url == other.url
  return false unless @expanded_url == other.expanded_url
  return false unless @display_url == other.display_url
  true
end