Sha256: d9461f93a9a77c15ebd9fba1b052e6d2ec034c913c22c6b24f8e7d3469ccfd4b

Contents?: true

Size: 445 Bytes

Versions: 4

Compression:

Stored size: 445 Bytes

Contents

# frozen_string_literal: true

module Gherkin
  class Token < Struct.new(:line, :location)
    attr_accessor :matched_type, :matched_text, :matched_keyword, :matched_indent,
                  :matched_items, :matched_gherkin_dialect, :matched_keyword_type

    def eof?
      line.nil?
    end

    def detach
      # TODO: detach line - is this needed?
    end

    def token_value
      eof? ? "EOF" : line.get_line_text(-1)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cucumber-gherkin-30.0.4 lib/gherkin/token.rb
cucumber-gherkin-30.0.3 lib/gherkin/token.rb
cucumber-gherkin-30.0.2 lib/gherkin/token.rb
cucumber-gherkin-30.0.1 lib/gherkin/token.rb