Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/crazy_doll/fixes.rb
Instance Method Summary collapse
Instance Method Details
#to_crazy_doll_regexp ⇒ Object
25 26 27 28 29 |
# File 'lib/crazy_doll/fixes.rb', line 25 def to_crazy_doll_regexp x=(' ' << self).gsub(/([^\\])::(\S+)/, '\1(\S+)').gsub(/([^\\])\*\*(\S+)/, '\1(.*)').gsub(/#{0.chr}[^#{1.chr}]+#{1.chr}([^#{2.chr}]+)#{2.chr}/, '\1') x[0] = '' Regexp.new("^#{x}$") end |