This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/spec/requests/api/schemas/schema_loader.rb
2023-01-09 11:49:28 +00:00

16 lines
258 B
Ruby

# frozen_string_literal: true
require "json"
module SpecSchemas
class SpecLoader
def initialize(filename)
@filename = filename
end
def load
JSON.parse(File.read(File.join(__dir__, "json", "#{@filename}.json")))
end
end
end