# File lib/cucumber/rb_support/rb_step_definition.rb, line 27 def initialize(rb_language, regexp, proc) raise MissingProc if proc.nil? if String === regexp p = Regexp.escape(regexp) p = p.gsub(/\\\$\w+/, '(.*)') # Replace $var with (.*) regexp = Regexp.new("^#{p}$") end @rb_language, @regexp, @proc = rb_language, regexp, proc @rb_language.available_step_definition(regexp_source, file_colon_line) end