Method: Regexp::MatchLength.of

Defined in:
lib/regexp_parser/expression/methods/match_length.rb

.of(obj) ⇒ Object



4
5
6
7
# File 'lib/regexp_parser/expression/methods/match_length.rb', line 4

def self.of(obj)
  exp = obj.is_a?(Regexp::Expression::Base) ? obj : Regexp::Parser.parse(obj)
  exp.match_length
end