Class: Getto::Roda::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/getto/roda/config.rb

Defined Under Namespace

Classes: Checker, Struct

Class Method Summary collapse

Class Method Details

.configure(schema) {|c| ... } ⇒ Object

Yields:

  • (c)


6
7
8
9
10
11
12
13
# File 'lib/getto/roda/config.rb', line 6

def self.configure(schema)
  c = Struct.new
  yield c
  c.freeze
  c.tap do
    Checker.new(schema).validate!(c)
  end
end