Class: Retab::WorkflowTableValidationColumnRule

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

Constant Summary collapse

HASH_ATTRS =
{
  type: :type,
  format: :format,
  is_not_empty: :is_not_empty
}.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) ⇒ WorkflowTableValidationColumnRule

Returns a new instance of WorkflowTableValidationColumnRule.



20
21
22
23
24
25
26
# File 'lib/retab/tables/workflow_table_validation_column_rule.rb', line 20

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @type = hash[:type]
  @format = hash[:format]
  @is_not_empty = hash[:is_not_empty].nil? ? false : hash[:is_not_empty]
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



14
15
16
# File 'lib/retab/tables/workflow_table_validation_column_rule.rb', line 14

def format
  @format
end

#is_not_emptyObject

Returns the value of attribute is_not_empty.



14
15
16
# File 'lib/retab/tables/workflow_table_validation_column_rule.rb', line 14

def is_not_empty
  @is_not_empty
end

#typeObject

Returns the value of attribute type.



14
15
16
# File 'lib/retab/tables/workflow_table_validation_column_rule.rb', line 14

def type
  @type
end