Class: Retab::ReconstructDocumentRef

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/retab/splits/reconstruct_document_ref.rb

Constant Summary collapse

HASH_ATTRS =
{
  filename: :filename,
  id: :id,
  mime_type: :mime_type
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ReconstructDocumentRef

Returns a new instance of ReconstructDocumentRef.



20
21
22
23
24
25
26
# File 'lib/retab/splits/reconstruct_document_ref.rb', line 20

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @filename = hash[:filename]
  @id = hash[:id]
  @mime_type = hash[:mime_type]
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



14
15
16
# File 'lib/retab/splits/reconstruct_document_ref.rb', line 14

def filename
  @filename
end

#idObject

Returns the value of attribute id.



14
15
16
# File 'lib/retab/splits/reconstruct_document_ref.rb', line 14

def id
  @id
end

#mime_typeObject

Returns the value of attribute mime_type.



14
15
16
# File 'lib/retab/splits/reconstruct_document_ref.rb', line 14

def mime_type
  @mime_type
end