Sha256: 8b5256d0574cba54fc85182e6cd9fd417b8b67b6a0691386f74d7cad050c32e1

Contents?: true

Size: 678 Bytes

Versions: 15

Compression:

Stored size: 678 Bytes

Contents

module Gurke
  class Tag
    #
    # Return path to file containing this feature.
    #
    # @return [String] File path.
    #
    attr_reader :file

    # Return line number where this feature is defined.
    #
    # @return [Fixnum] Line number.
    #
    attr_reader :line

    # @api private
    attr_reader :raw

    # @api private
    def initialize(file, line, raw)
      @file, @line, @raw = file, line, raw
    end

    def name
      raw.name[1..-1]
    end

    def to_s
      name
    end

    def match?(rule)
      p rule
      p name
      negated = rule[0] == '~'
      name = negated ? rule[1..-1] : rule
      negated != (self.name == name)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gurke-2.4.2 lib/gurke/tag.rb
gurke-2.4.1 lib/gurke/tag.rb
gurke-2.4.0 lib/gurke/tag.rb
gurke-2.3.0 lib/gurke/tag.rb
gurke-2.2.2 lib/gurke/tag.rb
gurke-2.2.1 lib/gurke/tag.rb
gurke-2.1.0 lib/gurke/tag.rb
gurke-2.0.3 lib/gurke/tag.rb
gurke-2.0.2 lib/gurke/tag.rb
gurke-2.0.1 lib/gurke/tag.rb
gurke-2.0.0 lib/gurke/tag.rb
gurke-2.0.0.dev.1.b25 lib/gurke/tag.rb
gurke-2.0.0.dev.1.b24 lib/gurke/tag.rb
gurke-2.0.0.dev.1.b23 lib/gurke/tag.rb
gurke-2.0.0.dev.1.b22 lib/gurke/tag.rb