Sha256: 5770a0be9223c1de4fab63e389db346bcb7563036c762749254641791f2df1c4
Contents?: true
Size: 979 Bytes
Versions: 2
Compression:
Stored size: 979 Bytes
Contents
module Turnip module DSL def placeholder(name, &block) Turnip::Placeholder.add(name, &block) end def step(description, &block) global_step_module_entry.step_module.steps << Turnip::StepDefinition.new(description, &block) end def steps_for(tag, &block) Turnip::StepModule.steps_for(tag, &block) end private def global_step_module_entry @global_step_module_entry ||= begin anon = Module.new do def self.steps @steps ||= [] end end entry = Turnip::StepModule::Entry.new([:global], anon, []) Turnip::StepModule.module_registry[:global] << entry entry end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
turnip-0.3.1 | lib/turnip/dsl.rb |
turnip-0.3.0 | lib/turnip/dsl.rb |