Module: Utils::IRB::Regexp

Included in:
Regexp
Defined in:
lib/utils/irb.rb

Instance Method Summary collapse

Instance Method Details

#show_match(string) ⇒ Object

Show the match of this Regexp on the string.



362
363
364
# File 'lib/utils/irb.rb', line 362

def show_match(string)
  string =~ self ? "#{$`}<<#{$&}>>#{$'}" : "no match"
end