Sha256: 0c4a8e77e98648bccf1eb159e28042ffbd8ad2ccff9b7112ede2b0b69c6e3281

Contents?: true

Size: 338 Bytes

Versions: 10

Compression:

Stored size: 338 Bytes

Contents

module Steep
  class LocatedValue
    attr_reader :value, :location

    def initialize(value:, location:)
      @value = value
      @location = location
    end

    def ==(other)
      other.is_a?(LocatedValue) && other.value == value
    end

    alias eql? ==

    def hash
      value.hash # steep:ignore NoMethod
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
steep-1.9.1 lib/steep/located_value.rb
steep-1.9.0 lib/steep/located_value.rb
steep-1.9.0.dev.2 lib/steep/located_value.rb
steep-1.9.0.dev.1 lib/steep/located_value.rb
steep-1.8.3 lib/steep/located_value.rb
steep-1.8.2 lib/steep/located_value.rb
steep-1.8.1 lib/steep/located_value.rb
steep-1.8.0 lib/steep/located_value.rb
steep-1.8.0.pre.2 lib/steep/located_value.rb
steep-1.8.0.pre.1 lib/steep/located_value.rb