Class: Retab::JsonSchemaValidCondition

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_tests/json_schema_valid_condition.rb

Constant Summary collapse

HASH_ATTRS =
{
  kind: :kind,
  schema: :schema
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ JsonSchemaValidCondition

Returns a new instance of JsonSchemaValidCondition.



17
18
19
20
21
# File 'lib/retab/workflow_tests/json_schema_valid_condition.rb', line 17

def initialize(json)
  hash = self.class.normalize(json)
  @kind = hash[:kind]
  @schema = hash[:schema] || {}
end

Instance Attribute Details

#kindObject

Returns the value of attribute kind.



13
14
15
# File 'lib/retab/workflow_tests/json_schema_valid_condition.rb', line 13

def kind
  @kind
end

#schemaObject

Returns the value of attribute schema.



13
14
15
# File 'lib/retab/workflow_tests/json_schema_valid_condition.rb', line 13

def schema
  @schema
end