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.



364
365
366
# File 'lib/utils/irb.rb', line 364

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