Class: XapiScraper::Models::Components::ArticleBlock

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(type:, text:, entity_ranges: nil) ⇒ ArticleBlock

Returns a new instance of ArticleBlock.



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

def initialize(type:, text:, entity_ranges: nil)
  @type = type
  @text = text
  @entity_ranges = entity_ranges
end

Instance Method Details

#==(other) ⇒ Object



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

def ==(other)
  return false unless other.is_a?(self.class)
  return false unless @type == other.type
  return false unless @text == other.text
  return false unless @entity_ranges == other.entity_ranges
  true
end