Class: Retab::WorkflowTableValidationResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowTableValidationResponse
- Defined in:
- lib/retab/tables/workflow_table_validation_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ table_id: :table_id, diagnostics: :diagnostics, has_errors: :has_errors }.freeze
Instance Attribute Summary collapse
-
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
-
#has_errors ⇒ Object
Returns the value of attribute has_errors.
-
#table_id ⇒ Object
Returns the value of attribute table_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowTableValidationResponse
constructor
A new instance of WorkflowTableValidationResponse.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowTableValidationResponse
Returns a new instance of WorkflowTableValidationResponse.
20 21 22 23 24 25 26 27 28 |
# File 'lib/retab/tables/workflow_table_validation_response.rb', line 20 def initialize(json) super() hash = self.class.normalize(json) @table_id = hash[:table_id] @diagnostics = (hash[:diagnostics] || []).map { |item| item ? Retab::WorkflowTableValidationDiagnostic.new(item) : nil } @has_errors = hash[:has_errors].nil? ? false : hash[:has_errors] end |
Instance Attribute Details
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
14 15 16 |
# File 'lib/retab/tables/workflow_table_validation_response.rb', line 14 def diagnostics @diagnostics end |
#has_errors ⇒ Object
Returns the value of attribute has_errors.
14 15 16 |
# File 'lib/retab/tables/workflow_table_validation_response.rb', line 14 def has_errors @has_errors end |
#table_id ⇒ Object
Returns the value of attribute table_id.
14 15 16 |
# File 'lib/retab/tables/workflow_table_validation_response.rb', line 14 def table_id @table_id end |