Sha256: 5b5710043928b6172095b39437dcab13383ba043f2b56b136dec83a6efbee914
Contents?: true
Size: 509 Bytes
Versions: 14
Compression:
Stored size: 509 Bytes
Contents
# frozen_string_literal: true module Twitch module Bot # This class stores the connection details for the client. class Config def initialize(settings: {}) @settings = settings end def setting(name) conf = settings name_str = name.to_s name_str.split("_").each do |key| return nil if conf.nil? conf = conf.fetch(key.to_sym, nil) end conf end private attr_reader :settings end end end
Version data entries
14 entries across 14 versions & 1 rubygems