Class: Retab::FileModel
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::FileModel
- Defined in:
- lib/retab/files/file.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, id: :id, filename: :filename, created_at: :created_at, updated_at: :updated_at, page_count: :page_count }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#id ⇒ Object
Returns the value of attribute id.
-
#object ⇒ Object
Returns the value of attribute object.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ FileModel
constructor
A new instance of FileModel.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ FileModel
Returns a new instance of FileModel.
25 26 27 28 29 30 31 32 33 |
# File 'lib/retab/files/file.rb', line 25 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @id = hash[:id] @filename = hash[:filename] @created_at = hash[:created_at] @updated_at = hash[:updated_at] @page_count = hash[:page_count] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
17 18 19 |
# File 'lib/retab/files/file.rb', line 17 def created_at @created_at end |
#filename ⇒ Object
Returns the value of attribute filename.
17 18 19 |
# File 'lib/retab/files/file.rb', line 17 def filename @filename end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/retab/files/file.rb', line 17 def id @id end |
#object ⇒ Object
Returns the value of attribute object.
17 18 19 |
# File 'lib/retab/files/file.rb', line 17 def object @object end |
#page_count ⇒ Object
Returns the value of attribute page_count.
17 18 19 |
# File 'lib/retab/files/file.rb', line 17 def page_count @page_count end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
17 18 19 |
# File 'lib/retab/files/file.rb', line 17 def updated_at @updated_at end |