razum2um/lurker

View on GitHub
lib/lurker/json/schema/extensions.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Lurker
  module Json
    class Extensions < Schema
      EXTENSIONS = 'extensions'.freeze

      def initialize(schema, options = {})
        @parent_property = EXTENSIONS

        super
      end

      def merge!(schema)
        return unless Lurker.upgrade?

        @schema = @parser.parse_property(parent_property, schema)
      end
    end
  end
end