Module: Utils::IRB::Regexp
- Included in:
- Regexp
- Defined in:
- lib/utils/irb.rb
Instance Method Summary collapse
-
#show_match(string) ⇒ Object
Show the match of this Regexp on the
string
.
Instance Method Details
#show_match(string) ⇒ Object
Show the match of this Regexp on the string
.
416 417 418 |
# File 'lib/utils/irb.rb', line 416 def show_match(string) string =~ self ? "#{$`}<<#{$&}>>#{$'}" : "no match" end |