Class: Retab::FileRef

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/extractions/file_ref.rb

Constant Summary collapse

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

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ FileRef

Returns a new instance of FileRef.



19
20
21
22
23
24
# File 'lib/retab/extractions/file_ref.rb', line 19

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

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



14
15
16
# File 'lib/retab/extractions/file_ref.rb', line 14

def filename
  @filename
end

#idObject

Returns the value of attribute id.



14
15
16
# File 'lib/retab/extractions/file_ref.rb', line 14

def id
  @id
end

#mime_typeObject

Returns the value of attribute mime_type.



14
15
16
# File 'lib/retab/extractions/file_ref.rb', line 14

def mime_type
  @mime_type
end