Sha256: 5d0bed8ef0383e8befc243d409abb9bc4e62ded0c99d36a14ecdf49321b018bd
Contents?: true
Size: 639 Bytes
Versions: 21
Compression:
Stored size: 639 Bytes
Contents
# frozen_string_literal: true require "json" module Icarus module Mod # Reads the configuration file class Config class << self def config return @config if @config read end def read(config_file = self.config_file) @config = JSON.parse(File.read(config_file), object_class: OpenStruct) end def firebase @config.firebase end def github @config.github end private def config_file @config_file ||= File.join(Dir.home, "/.imtconfig.json") end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems