Flowdock
method

assign_expression

Importance_0
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Story::Step

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.1.4) is shown here.

assign_expression(string_or_regexp) private

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/story/step.rb, line 42
        def assign_expression(string_or_regexp)
          if String === string_or_regexp
            expression = string_or_regexp.dup
            expression.gsub! '(', '\('
            expression.gsub! ')', '\)'
          elsif Regexp === string_or_regexp
            expression = string_or_regexp.source
          end
          while expression =~ PARAM_PATTERN
            expression.gsub!($2, "(.*?)")
          end
          @expression = Regexp.new("^#{expression}$")
        end
Register or log in to add new notes.