Sha256: 5f842c7ecbd755acdef5158cfe2db77ff902b18efb243bfdbe3d662611e71dd0

Contents?: true

Size: 414 Bytes

Versions: 17

Compression:

Stored size: 414 Bytes

Contents

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

17 entries across 17 versions & 2 rubygems

Version Path
cucumber-gherkin-30.0.0 lib/gherkin/token.rb
cucumber-gherkin-29.0.0 lib/gherkin/token.rb
cucumber-gherkin-28.0.0 lib/gherkin/token.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/cucumber-gherkin-26.2.0/lib/gherkin/token.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/cucumber-gherkin-26.2.0/lib/gherkin/token.rb
cucumber-gherkin-27.0.0 lib/gherkin/token.rb
cucumber-gherkin-26.2.0 lib/gherkin/token.rb
cucumber-gherkin-26.1.0 lib/gherkin/token.rb
cucumber-gherkin-26.0.3 lib/gherkin/token.rb
cucumber-gherkin-26.0.2 lib/gherkin/token.rb
cucumber-gherkin-26.0.1 lib/gherkin/token.rb
cucumber-gherkin-26.0.0 lib/gherkin/token.rb
cucumber-gherkin-25.0.2 lib/gherkin/token.rb
cucumber-gherkin-25.0.1 lib/gherkin/token.rb
cucumber-gherkin-25.0.0 lib/gherkin/token.rb
cucumber-gherkin-24.1.0 lib/gherkin/token.rb
cucumber-gherkin-24.0.0 lib/gherkin/token.rb