Sha256: 3e0f051db764f5c7c342ba2ba4035354eefbfb8891c438591b5de10311b64c33
Contents?: true
Size: 460 Bytes
Versions: 27
Compression:
Stored size: 460 Bytes
Contents
module Turnip module Define def step(method_name=nil, expression, &block) if method_name and block raise ArgumentError, "can't specify both method name and a block for a step" end step = Turnip::StepDefinition.new(expression, method_name, caller.first, &block) send(:define_method, "match: #{expression}") { |description| step.match(description) } send(:define_method, expression, &block) if block end end end
Version data entries
27 entries across 27 versions & 1 rubygems