Module: Thoran::String::Capture

Defined in:
lib/Thoran/String/Capture/capture.rb

Instance Method Summary collapse

Instance Method Details

#capture(regex) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/Thoran/String/Capture/capture.rb', line 16

def capture(regex)
  if md = self.match(regex)
    md[1]
  else
    nil
  end
end