Class: RSpec::OpenAPI::SchemaFile
- Inherits:
-
Object
- Object
- RSpec::OpenAPI::SchemaFile
- Defined in:
- lib/rspec/openapi/schema_file.rb
Overview
TODO: Support JSON
Instance Method Summary collapse
- #edit(&block) ⇒ Object
-
#initialize(path) ⇒ SchemaFile
constructor
A new instance of SchemaFile.
Constructor Details
#initialize(path) ⇒ SchemaFile
Returns a new instance of SchemaFile.
7 8 9 |
# File 'lib/rspec/openapi/schema_file.rb', line 7 def initialize(path) @path = path end |
Instance Method Details
#edit(&block) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/rspec/openapi/schema_file.rb', line 11 def edit(&block) spec = read block.call(spec) ensure write(spec) end |