Class: Retab::FileRef
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::FileRef
- 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
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#id ⇒ Object
Returns the value of attribute id.
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ FileRef
constructor
A new instance of FileRef.
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
#filename ⇒ Object
Returns the value of attribute filename.
14 15 16 |
# File 'lib/retab/extractions/file_ref.rb', line 14 def filename @filename end |
#id ⇒ Object
Returns the value of attribute id.
14 15 16 |
# File 'lib/retab/extractions/file_ref.rb', line 14 def id @id end |
#mime_type ⇒ Object
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 |