Sha256: 7fc579423b06850434dec6b96a7da87714903261e4762e1374e17458e45d173c

Contents?: true

Size: 312 Bytes

Versions: 6

Compression:

Stored size: 312 Bytes

Contents

# frozen_string_literal: true

module WhatWeb
  module Matcher
    class Text < Base
      attr_reader :text
      def initialize(target, match)
        super(target, match)
        @text = match[:text].to_s
      end

      def compiled_regexp
        Regexp.new Regexp.escape(text)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
simple_whatweb-0.4.1 lib/whatweb/matcher/text.rb
simple_whatweb-0.4.0 lib/whatweb/matcher/text.rb
simple_whatweb-0.3.0 lib/whatweb/matcher/text.rb
simple_whatweb-0.2.1 lib/whatweb/matcher/text.rb
simple_whatweb-0.2.0 lib/whatweb/matcher/text.rb
simple_whatweb-0.1.0 lib/whatweb/matcher/text.rb