Sha256: 10131de521e92689841bb4145b604616b8250fbddfcdb48d085b45f1a481f1bf

Contents?: true

Size: 691 Bytes

Versions: 10

Compression:

Stored size: 691 Bytes

Contents

module Steep
  module AST
    module Types
      class Boolean
        extend SharedInstance
        
        def ==(other)
          other.is_a?(Boolean)
        end

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          self
        end

        def to_s
          "bool"
        end

        include Helper::NoFreeVariables

        include Helper::NoChild

        def level
          [0]
        end

        def back_type
          Union.build(
            types: [
              Builtin::TrueClass.instance_type,
              Builtin::FalseClass.instance_type
            ]
          )
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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