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.
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 = {}, &block Boxafe::Box.new(@config..merge()).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 |