Class: SchemaRegistry::SchemaRegistration
- Inherits:
-
Object
- Object
- SchemaRegistry::SchemaRegistration
- Defined in:
- lib/schema_registry/subject.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#schema ⇒ Object
Returns the value of attribute schema.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(subject, options = {}) ⇒ SchemaRegistration
constructor
A new instance of SchemaRegistration.
- #pretty_json ⇒ Object
Constructor Details
#initialize(subject, options = {}) ⇒ SchemaRegistration
Returns a new instance of SchemaRegistration.
6 7 8 9 10 11 |
# File 'lib/schema_registry/subject.rb', line 6 def initialize(subject, = {}) @subject = subject @id = ['id'] @version = ['version'] @schema = ['schema'] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/schema_registry/subject.rb', line 4 def id @id end |
#schema ⇒ Object
Returns the value of attribute schema.
4 5 6 |
# File 'lib/schema_registry/subject.rb', line 4 def schema @schema end |
#subject ⇒ Object
Returns the value of attribute subject.
4 5 6 |
# File 'lib/schema_registry/subject.rb', line 4 def subject @subject end |
#version ⇒ Object
Returns the value of attribute version.
4 5 6 |
# File 'lib/schema_registry/subject.rb', line 4 def version @version end |
Instance Method Details
#pretty_json ⇒ Object
13 14 15 |
# File 'lib/schema_registry/subject.rb', line 13 def pretty_json JSON.pretty_generate(JSON.parse(@schema)) end |