Sha256: 06a9283766269d628ffbe6d3421dc580541fa0ae0f87f2c5195d86662065e758
Contents?: true
Size: 865 Bytes
Versions: 19
Compression:
Stored size: 865 Bytes
Contents
# frozen_string_literal: true require 'yaml' require 'singleton' require_relative '../helpers/hash' module NanoBot module Logic module Cartridge class Default include Singleton def values return @values if @values path = File.expand_path('../../static/cartridges/default.yml', __dir__) cartridge = YAML.safe_load_file(path, permitted_classes: [Symbol]) @values = Logic::Helpers::Hash.symbolize_keys(cartridge) @values end def baseline return @baseline if @baseline path = File.expand_path('../../static/cartridges/baseline.yml', __dir__) cartridge = YAML.safe_load_file(path, permitted_classes: [Symbol]) @baseline = Logic::Helpers::Hash.symbolize_keys(cartridge) @baseline end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems