Class: Swagger::Base

Inherits:
Object
  • Object
show all
Includes:
RackHelpers
Defined in:
lib/swagger/base.rb

Instance Method Summary collapse

Methods included from RackHelpers

#request_spec

Constructor Details

#initialize(filepath) ⇒ Base

Returns a new instance of Base.



28
29
30
31
# File 'lib/swagger/base.rb', line 28

def initialize(filepath)
  @spec = YAML.load(open(filepath))
  JSON::Validator.validate!({ "$ref" => "http://swagger.io/v2/schema.json#" }, @spec)
end