Class: Retab::PartialSchema
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::PartialSchema
- Defined in:
- lib/retab/schemas/partial_schema.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, created_at: :created_at, json_schema: :json_schema, strict: :strict }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#json_schema ⇒ Object
Returns the value of attribute json_schema.
-
#object ⇒ Object
Returns the value of attribute object.
-
#strict ⇒ Object
Returns the value of attribute strict.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ PartialSchema
constructor
A new instance of PartialSchema.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ PartialSchema
Returns a new instance of PartialSchema.
21 22 23 24 25 26 27 |
# File 'lib/retab/schemas/partial_schema.rb', line 21 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @created_at = hash[:created_at] @json_schema = hash[:json_schema] || {} @strict = hash[:strict] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
15 16 17 |
# File 'lib/retab/schemas/partial_schema.rb', line 15 def created_at @created_at end |
#json_schema ⇒ Object
Returns the value of attribute json_schema.
15 16 17 |
# File 'lib/retab/schemas/partial_schema.rb', line 15 def json_schema @json_schema end |
#object ⇒ Object
Returns the value of attribute object.
15 16 17 |
# File 'lib/retab/schemas/partial_schema.rb', line 15 def object @object end |
#strict ⇒ Object
Returns the value of attribute strict.
15 16 17 |
# File 'lib/retab/schemas/partial_schema.rb', line 15 def strict @strict end |