class Dry::System::Components::Config
Public Class Methods
new() { |config| ... }
click to toggle source
Calls superclass method
# File lib/dry/system/components/config.rb, line 7 def self.new(&block) config = super yield(config) if block_given? config end
new()
click to toggle source
# File lib/dry/system/components/config.rb, line 13 def initialize @settings = {} end
Public Instance Methods
to_hash()
click to toggle source
# File lib/dry/system/components/config.rb, line 17 def to_hash @settings end
Private Instance Methods
method_missing(meth, value = nil)
click to toggle source
Calls superclass method
# File lib/dry/system/components/config.rb, line 23 def method_missing(meth, value = nil) if meth.to_s.end_with?("=") @settings[meth.to_s.gsub("=", "").to_sym] = value elsif @settings.key?(meth) @settings[meth] else super end end