Class: RBI::Type::Class
- Inherits:
-
Type
- Object
- Type
- RBI::Type::Class
- Defined in:
- lib/rbi/type.rb
Overview
The class of another type like T::Class[Foo].
Instance Attribute Summary collapse
- #type ⇒ Object readonly
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type) ⇒ Class
constructor
A new instance of Class.
- #normalize ⇒ Object
- #simplify ⇒ Object
- #to_rbi ⇒ Object
Constructor Details
#initialize(type) ⇒ Class
Returns a new instance of Class.
247 248 249 250 |
# File 'lib/rbi/type.rb', line 247 def initialize(type) super() @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
244 245 246 |
# File 'lib/rbi/type.rb', line 244 def type @type end |
Instance Method Details
#==(other) ⇒ Object
254 255 256 |
# File 'lib/rbi/type.rb', line 254 def ==(other) Class === other && @type == other.type end |
#normalize ⇒ Object
266 267 268 |
# File 'lib/rbi/type.rb', line 266 def normalize self end |
#simplify ⇒ Object
272 273 274 |
# File 'lib/rbi/type.rb', line 272 def simplify self end |
#to_rbi ⇒ Object
260 261 262 |
# File 'lib/rbi/type.rb', line 260 def to_rbi "::T::Class[#{@type}]" end |