Class: OmniScrapper::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/omni_scrapper/schema.rb

Instance Method Summary collapse

Instance Method Details

#schemaObject



9
10
11
# File 'lib/omni_scrapper/schema.rb', line 9

def schema
  fail 'Implement in child class'
end

#validate!(data) ⇒ Object



5
6
7
# File 'lib/omni_scrapper/schema.rb', line 5

def validate!(data)
  JSON::Validator.validate!(schema, data)
end