Sha256: 36dbdc382d94c916a7cc6ae9bfbc0821390ff4ceba10139813a7bfb8b4dbd195
Contents?: true
Size: 406 Bytes
Versions: 15
Compression:
Stored size: 406 Bytes
Contents
module RailsEdgeTest::Dsl class LetHandler attr_reader :let_blocks def initialize @let_blocks = {} end def add_definition(title, &block) @let_blocks[title] = block end def execute(title) block = @let_blocks[title] unless block fail NoMethodError, "no method or let block defined with name #{title}" end block.call end end end
Version data entries
15 entries across 15 versions & 1 rubygems