Class: Avrolution::RegisterSchemas
- Inherits:
-
Object
- Object
- Avrolution::RegisterSchemas
- Extended by:
- PrivateAttr
- Defined in:
- lib/avrolution/register_schemas.rb
Defined Under Namespace
Classes: IncompatibleSchemaError
Instance Attribute Summary collapse
-
#schema_files ⇒ Object
readonly
Returns the value of attribute schema_files.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(schema_files) ⇒ RegisterSchemas
constructor
A new instance of RegisterSchemas.
Constructor Details
#initialize(schema_files) ⇒ RegisterSchemas
Returns a new instance of RegisterSchemas.
22 23 24 25 26 |
# File 'lib/avrolution/register_schemas.rb', line 22 def initialize(schema_files) @schema_files = Array(schema_files) @compatibility_breaks = Avrolution::CompatibilityBreaksFile.load @schema_registry = build_schema_registry end |
Instance Attribute Details
#schema_files ⇒ Object (readonly)
Returns the value of attribute schema_files.
12 13 14 |
# File 'lib/avrolution/register_schemas.rb', line 12 def schema_files @schema_files end |
Instance Method Details
#call ⇒ Object
28 29 30 31 32 |
# File 'lib/avrolution/register_schemas.rb', line 28 def call schemas.each do |(json, schema)| register_schema(schema, json) end end |