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.


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

def initialize config
  @config = config
end

Instance Method Details

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


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

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

#env(*args) ⇒ Object


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

def env *args
  Mutaconf.env *args
end