Class: ApiValidator::JsonSchemas

Inherits:
Object
  • Object
show all
Defined in:
lib/api-validator/json_schemas.rb

Class Method Summary collapse

Class Method Details

.[](schema_name) ⇒ Object



15
16
17
# File 'lib/api-validator/json_schemas.rb', line 15

def self.[](schema_name)
  schemas[schema_name.to_s]
end

.register(schema_name, schema) ⇒ Object Also known as: []=



4
5
6
# File 'lib/api-validator/json_schemas.rb', line 4

def self.register(schema_name, schema)
  schemas[schema_name.to_s] = schema
end

.schemasObject



11
12
13
# File 'lib/api-validator/json_schemas.rb', line 11

def self.schemas
  @schemas ||= {}
end