Class: RBI::Type::Boolean

Inherits:
RBI::Type show all
Defined in:
lib/rbi/type.rb

Overview

‘T::Boolean`.

Instance Method Summary collapse

Methods inherited from RBI::Type

all, any, anything, attached_class, boolean, class_of, #eql?, generic, #hash, #initialize, #nilable, nilable, #nilable?, #non_nilable, noreturn, parse_node, parse_string, proc, #rbs_string, self_type, shape, simple, t_class, #to_s, tuple, type_parameter, untyped, void

Constructor Details

This class inherits a constructor from RBI::Type

Instance Method Details

#==(other) ⇒ Object

: (BasicObject other) -> bool



108
109
110
# File 'lib/rbi/type.rb', line 108

def ==(other)
  Boolean === other
end

#normalizeObject

: -> Type



120
121
122
# File 'lib/rbi/type.rb', line 120

def normalize
  Type::Any.new([Type.simple("TrueClass"), Type.simple("FalseClass")])
end

#simplifyObject

: -> Type



126
127
128
# File 'lib/rbi/type.rb', line 126

def simplify
  self
end

#to_rbiObject

: -> String



114
115
116
# File 'lib/rbi/type.rb', line 114

def to_rbi
  "T::Boolean"
end