mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 21:05:58 +08:00
19 lines
261 B
Ruby
19 lines
261 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
|