class Twitch::Bot::Config
This class stores the connection details for the client.
Attributes
settings[R]
Public Class Methods
new(settings: {})
click to toggle source
# File lib/twitch/bot/config.rb, line 7 def initialize(settings: {}) @settings = settings end
Public Instance Methods
setting(name)
click to toggle source
# File lib/twitch/bot/config.rb, line 11 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