Class: Retab::EditResult
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::EditResult
- Defined in:
- lib/retab/workflow_artifacts/edit_result.rb
Constant Summary collapse
- HASH_ATTRS =
{ form_data: :form_data, filled_document: :filled_document }.freeze
Instance Attribute Summary collapse
-
#filled_document ⇒ Object
Returns the value of attribute filled_document.
-
#form_data ⇒ Object
Returns the value of attribute form_data.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ EditResult
constructor
A new instance of EditResult.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ EditResult
Returns a new instance of EditResult.
17 18 19 20 21 |
# File 'lib/retab/workflow_artifacts/edit_result.rb', line 17 def initialize(json) hash = self.class.normalize(json) @form_data = (hash[:form_data] || []).map { |item| item ? Retab::FormField.new(item) : nil } @filled_document = hash[:filled_document] ? Retab::MimeData.new(hash[:filled_document]) : nil end |
Instance Attribute Details
#filled_document ⇒ Object
Returns the value of attribute filled_document.
13 14 15 |
# File 'lib/retab/workflow_artifacts/edit_result.rb', line 13 def filled_document @filled_document end |
#form_data ⇒ Object
Returns the value of attribute form_data.
13 14 15 |
# File 'lib/retab/workflow_artifacts/edit_result.rb', line 13 def form_data @form_data end |