module TurbotRunner

Constants

SCHEMAS_PATH
VERSION

Public Class Methods

get_and_validate_schema_path(data_type) click to toggle source
# File lib/turbot_runner.rb, line 22
def self.get_and_validate_schema_path(data_type)
  hyphenated_name = data_type.to_s.gsub(" ", "-")
  path = File.join(SCHEMAS_PATH, "#{hyphenated_name}-schema.json")
  raise TurbotRunner::InvalidDataType.new("Could not find #{path}") unless File.exists?(path)
  path
end
schema_path(data_type) click to toggle source
# File lib/turbot_runner.rb, line 15
def self.schema_path(data_type)
  @schema_paths ||= Hash.new do |h, k|
    h[k] = get_and_validate_schema_path(k)
  end
  @schema_paths[data_type]
end