Class: Rugex::Regex
- Inherits:
-
Object
- Object
- Rugex::Regex
- Defined in:
- lib/rugex/regex.rb
Class Method Summary collapse
Class Method Details
.to_regex(string) ⇒ Object
3 4 5 6 |
# File 'lib/rugex/regex.rb', line 3 def self.to_regex(string) return Regexp.new(string) if (string =~ /^\/.*\/$/) == nil return Regexp.new($1) if (string =~ /^\/(.*)\/$/) != nil end |