Class: Boxafe::Config::DSL
- Inherits:
-
Object
- Object
- Boxafe::Config::DSL
- Defined in:
- lib/boxafe/config.rb
Instance Method Summary collapse
- #box(options = {}, &block) ⇒ Object
- #env(*args) ⇒ Object
-
#initialize(config) ⇒ DSL
constructor
A new instance of DSL.
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 = {}, &block Boxafe::Box.new(@config..merge()).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 |