Module: Interscript::Utils::Helpers
- Defined in:
- lib/interscript/utils/helpers.rb
Instance Method Summary collapse
Instance Method Details
#document(name = nil, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/interscript/utils/helpers.rb', line 3 def document name=nil, &block $example_id ||= 0 $example_id += 1 name ||= "example-#{$example_id}" Interscript::DSL::Document.new(name, &block).node.tap do |i| $documents ||= {} $documents[name] = i end end |
#stage(&block) ⇒ Object
14 15 16 17 18 |
# File 'lib/interscript/utils/helpers.rb', line 14 def stage &block document { stage(&block) } end |