Class: Lara::Models::Document
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#error_reason ⇒ Object
readonly
Returns the value of attribute error_reason.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#total_chars ⇒ Object
readonly
Returns the value of attribute total_chars.
-
#translated_chars ⇒ Object
readonly
Returns the value of attribute translated_chars.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(id:, status:, filename:, target: nil, source: nil, created_at: nil, updated_at: nil, options: nil, translated_chars: nil, total_chars: nil, error_reason: nil) ⇒ Document
constructor
A new instance of Document.
Methods inherited from Base
Constructor Details
#initialize(id:, status:, filename:, target: nil, source: nil, created_at: nil, updated_at: nil, options: nil, translated_chars: nil, total_chars: nil, error_reason: nil) ⇒ Document
Returns a new instance of Document.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/lara/models/documents.rb', line 46 def initialize(id:, status:, filename:, target: nil, source: nil, created_at: nil, updated_at: nil, options: nil, translated_chars: nil, total_chars: nil, error_reason: nil) super() @id = id @status = status @source = source @target = target @filename = filename @created_at = Base.parse_time(created_at) @updated_at = Base.parse_time(updated_at) @options = @translated_chars = translated_chars&.to_i @total_chars = total_chars&.to_i @error_reason = error_reason end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def created_at @created_at end |
#error_reason ⇒ Object (readonly)
Returns the value of attribute error_reason.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def error_reason @error_reason end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def filename @filename end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def id @id end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def @options end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def source @source end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def status @status end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def target @target end |
#total_chars ⇒ Object (readonly)
Returns the value of attribute total_chars.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def total_chars @total_chars end |
#translated_chars ⇒ Object (readonly)
Returns the value of attribute translated_chars.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def translated_chars @translated_chars end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
43 44 45 |
# File 'lib/lara/models/documents.rb', line 43 def updated_at @updated_at end |