Sha256: 662a269d3e85ef01313de3844ad3c694d0ea8cb7415828cbae9ec15f42364fe4

Contents?: true

Size: 422 Bytes

Versions: 3

Compression:

Stored size: 422 Bytes

Contents

require "attentive/token"

module Attentive
  module Tokens
    class AnyOf < StringToken
      attr_reader :possibilities

      def initialize(string, possibilities, pos)
        super string, pos
        @possibilities = possibilities
      end

      def ==(other)
        self.class == other.class && self.possibilities == other.possibilities
      end

      def ambiguous?
        true
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
attentive-0.3.1 lib/attentive/tokens/any_of.rb
attentive-0.3.0 lib/attentive/tokens/any_of.rb
attentive-0.2.0 lib/attentive/tokens/any_of.rb