Class: Retab::WorkflowTableValidationDiagnostic

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/tables/workflow_table_validation_diagnostic.rb

Constant Summary collapse

HASH_ATTRS =
{
  severity: :severity,
  column: :column,
  rule: :rule,
  message: :message
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

deep_symbolize, #inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ WorkflowTableValidationDiagnostic

Returns a new instance of WorkflowTableValidationDiagnostic.



22
23
24
25
26
27
28
29
# File 'lib/retab/tables/workflow_table_validation_diagnostic.rb', line 22

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @severity = hash[:severity]
  @column = hash[:column]
  @rule = hash[:rule]
  @message = hash[:message]
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



15
16
17
# File 'lib/retab/tables/workflow_table_validation_diagnostic.rb', line 15

def column
  @column
end

#messageObject

Returns the value of attribute message.



15
16
17
# File 'lib/retab/tables/workflow_table_validation_diagnostic.rb', line 15

def message
  @message
end

#ruleObject

Returns the value of attribute rule.



15
16
17
# File 'lib/retab/tables/workflow_table_validation_diagnostic.rb', line 15

def rule
  @rule
end

#severityObject

Returns the value of attribute severity.



15
16
17
# File 'lib/retab/tables/workflow_table_validation_diagnostic.rb', line 15

def severity
  @severity
end