Class: XapiScraper::Models::Components::StreamModel

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(url: nil, bitrate: nil, content_type: nil) ⇒ StreamModel

Returns a new instance of StreamModel.



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

def initialize(url: nil, bitrate: nil, content_type: nil)
  @url = url
  @bitrate = bitrate
  @content_type = content_type
end

Instance Method Details

#==(other) ⇒ Object



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

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