Sha256: 4cb9bf3baabe3f2e885536da79761ab2714c6c86fa7a5c8bebb4eb5f623afc68

Contents?: true

Size: 328 Bytes

Versions: 7

Compression:

Stored size: 328 Bytes

Contents

class Rindle
  module Mixins
    module Regexp

      # converts the expressin to a string and
      # strips the special characters for marking
      # the beginning and end of a string
      def strip
        self.source.gsub(/^\^/,'').gsub(/\$$/,'')
      end

    end
  end
end

Regexp.send :include, Rindle::Mixins::Regexp

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rindle-0.3.4 lib/rindle/mixins/regexp.rb
rindle-0.3.3 lib/rindle/mixins/regexp.rb
rindle-0.3.2 lib/rindle/mixins/regexp.rb
rindle-0.3.1 lib/rindle/mixins/regexp.rb
rindle-0.3.0 lib/rindle/mixins/regexp.rb
rindle-0.2.0 lib/rindle/mixins/regexp.rb
rindle-0.1.1 lib/rindle/mixins/regexp.rb