Sha256: b13a6c2bf2e9adfaa2634275c4b7508e49f14a096d514fc27ea2e6699448290f

Contents?: true

Size: 231 Bytes

Versions: 8

Compression:

Stored size: 231 Bytes

Contents

module WarningSigns
  class RegexPattern
    attr_accessor :pattern

    def initialize(raw_pattern)
      @pattern = Regexp.new(raw_pattern[1...-1])
    end

    def match?(message)
      pattern.match?(message)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
warning_signs-0.7.2 lib/warning_signs/regex_pattern.rb
warning_signs-0.7.1 lib/warning_signs/regex_pattern.rb
warning_signs-0.7.0 lib/warning_signs/regex_pattern.rb
warning_signs-0.6.1 lib/warning_signs/regex_pattern.rb
warning_signs-0.6.0 lib/warning_signs/regex_pattern.rb
warning_signs-0.5.0 lib/warning_signs/regex_pattern.rb
warning_signs-0.4.0 lib/warning_signs/regex_pattern.rb
warning_signs-0.3.0 lib/warning_signs/regex_pattern.rb