Module: Specdown::SandboxFactory
Instance Method Summary collapse
Instance Method Details
#decorate(&block) ⇒ Object
13 14 15 |
# File 'lib/specdown/sandbox_factory.rb', line 13 def decorate(&block) decorators << block end |
#generate ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/specdown/sandbox_factory.rb', line 5 def generate Module.new {}.tap do |sandbox| decorators.each do |decorator| decorator.call sandbox end end end |