class Dry::System::Settings::DSL
Attributes
schema[R]
Public Class Methods
new(&block)
click to toggle source
# File lib/dry/system/settings.rb, line 16 def initialize(&block) @schema = {} instance_eval(&block) end
Public Instance Methods
call()
click to toggle source
# File lib/dry/system/settings.rb, line 21 def call Core::ClassBuilder.new(name: "Configuration", parent: Configuration).call do |klass| schema.each do |key, type| klass.setting(key, type) end end end
key(name, type)
click to toggle source
# File lib/dry/system/settings.rb, line 29 def key(name, type) schema[name] = type end