Class: Swagger::Base
- Inherits:
-
Object
- Object
- Swagger::Base
- Includes:
- RackHelpers
- Defined in:
- lib/swagger/base.rb
Instance Method Summary collapse
-
#initialize(filepath) ⇒ Base
constructor
A new instance of Base.
Methods included from RackHelpers
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 |