Sha256: 4a1648da0f608af4154e2f5d576c9169c5ef4572c9172d18cddafc5e1dc9c121

Contents?: true

Size: 388 Bytes

Versions: 24

Compression:

Stored size: 388 Bytes

Contents

module GraphQL
  module Language
    class Token
      attr_reader :name
      def initialize(value:, name:, line:, col:)
        @name = name
        @value = value
        @line = line
        @col = col
      end

      def to_s; @value; end
      def to_i; @value.to_i; end
      def to_f; @value.to_f; end

      def line_and_column
        [@line, @col]
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
graphql-0.18.10 lib/graphql/language/token.rb
graphql-0.18.9 lib/graphql/language/token.rb
graphql-0.18.8 lib/graphql/language/token.rb
graphql-0.18.7 lib/graphql/language/token.rb
graphql-0.18.6 lib/graphql/language/token.rb
graphql-0.18.5 lib/graphql/language/token.rb
graphql-0.18.4 lib/graphql/language/token.rb
graphql-0.18.3 lib/graphql/language/token.rb
graphql-0.18.2 lib/graphql/language/token.rb
graphql-0.18.1 lib/graphql/language/token.rb
graphql-0.18.0 lib/graphql/language/token.rb
graphql-0.17.2 lib/graphql/language/token.rb
graphql-0.17.1 lib/graphql/language/token.rb
graphql-0.17.0 lib/graphql/language/token.rb
graphql-0.16.1 lib/graphql/language/token.rb
graphql-0.16.0 lib/graphql/language/token.rb
graphql-0.15.3 lib/graphql/language/token.rb
graphql-0.15.2 lib/graphql/language/token.rb
graphql-0.14.2 lib/graphql/language/token.rb
graphql-0.15.1 lib/graphql/language/token.rb