Sha256: adf092d335d28def5a7484c1a086e7b8f738052aa9fe94e04d328a04b1f3a2ca

Contents?: true

Size: 671 Bytes

Versions: 16

Compression:

Stored size: 671 Bytes

Contents

module Steep
  module AST
    module Types
      class Class
        attr_reader :location

        def initialize(location: nil)
          @location = location
        end

        def ==(other)
          other.is_a?(Class)
        end

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          s.module_type or raise "Unexpected substitution: #{inspect}"
        end

        def free_variables()
          @fvs = Set.new([self])
        end

        def level
          [0]
        end

        def with_location(new_location)
          self.class.new(location: new_location)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
steep-0.41.0 lib/steep/ast/types/class.rb
steep-0.40.0 lib/steep/ast/types/class.rb
steep-0.39.0 lib/steep/ast/types/class.rb
steep-0.38.0 lib/steep/ast/types/class.rb
steep-0.37.0 lib/steep/ast/types/class.rb
steep-0.36.0 lib/steep/ast/types/class.rb
steep-0.35.0 lib/steep/ast/types/class.rb
steep-0.34.0 lib/steep/ast/types/class.rb
steep-0.33.0 lib/steep/ast/types/class.rb
steep-0.32.0 lib/steep/ast/types/class.rb
steep-0.31.1 lib/steep/ast/types/class.rb
steep-0.31.0 lib/steep/ast/types/class.rb
steep-0.30.0 lib/steep/ast/types/class.rb
steep-0.29.0 lib/steep/ast/types/class.rb
steep-0.28.0 lib/steep/ast/types/class.rb
steep-0.27.0 lib/steep/ast/types/class.rb