class Grayskull::CLI
The CLI class provides an interface for the command line functions
Public Instance Methods
validate(file,schema)
click to toggle source
Creates a new Validator and validates the file
# File lib/grayskull/cli.rb, line 10 def validate(file,schema) validator = Grayskull::Validator.new(file,schema) results = validator.validate if !results['result'] puts 'Validation Failed with ' + results['errors'].count.to_s + ' errors'; puts '' results["errors"].each{ |error| puts error } else puts 'Validated Successfully!' end end