Class: Moov::Models::Components::Document

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(document_id:, type:, content_type:, uploaded_at:, parse_errors: nil) ⇒ Document

Returns a new instance of Document.



28
29
30
31
32
33
34
# File 'lib/moov/models/components/document.rb', line 28

def initialize(document_id:, type:, content_type:, uploaded_at:, parse_errors: nil)
  @document_id = document_id
  @type = type
  @content_type = content_type
  @uploaded_at = uploaded_at
  @parse_errors = parse_errors
end

Instance Method Details

#==(other) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/moov/models/components/document.rb', line 37

def ==(other)
  return false unless other.is_a? self.class
  return false unless @document_id == other.document_id
  return false unless @type == other.type
  return false unless @content_type == other.content_type
  return false unless @uploaded_at == other.uploaded_at
  return false unless @parse_errors == other.parse_errors
  true
end