class Dry::Configurable::Compiler

@api private
Setting compiler used internally by the DSL

def call(ast)

def call(ast)
  Settings.new.tap do |settings|
    ast.each do |node|
      settings << visit(node)
    end
  end
end

def visit(node)

Other tags:
    Api: - private
def visit(node)
  type, rest = node
  public_send(:"visit_#{type}", rest)
end

def visit_constructor(node)

Other tags:
    Api: - private
def visit_constructor(node)
  setting, constructor = node
  visit(setting).with(constructor: constructor)
end

def visit_nested(node)

Other tags:
    Api: - private
def visit_nested(node)
  parent, children = node
  visit(parent).nested(call(children))
end

def visit_setting(node)

Other tags:
    Api: - private
def visit_setting(node)
  name, default, opts = node
  Setting.new(name, **opts, default: default)
end