Class: Regexp

Inherits:
Object show all
Defined in:
lib/filigree/match.rb

Instance Method Summary collapse

Instance Method Details

#as(binding_pattern) ⇒ Object

Causes a string matching the regular expression to be bound the the given name.

Parameters:

  • binding_pattern (BindingPattern)

    Name to bind the instance to



656
657
658
# File 'lib/filigree/match.rb', line 656

def as(binding_pattern)
	binding_pattern.tap { |bp| bp.pattern_elem = Filigree::RegexpPattern.new(self) }
end