Class: Boxafe::Config::DSL

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

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ DSL

Returns a new instance of DSL.



32
33
34
# File 'lib/boxafe/config.rb', line 32

def initialize config
  @config = config
end

Instance Method Details

#box(options = {}, &block) ⇒ Object



36
37
38
39
40
# File 'lib/boxafe/config.rb', line 36

def box options = {}, &block
  Boxafe::Box.new(@config.options.merge(options)).tap do |box|
    @config.boxes << box.configure(&block)
  end
end

#env(*args) ⇒ Object



42
43
44
# File 'lib/boxafe/config.rb', line 42

def env *args
  Mutaconf.env *args
end