Class: RBI::Type::Module
- Inherits:
-
Type
- Object
- Type
- RBI::Type::Module
- Defined in:
- lib/rbi/type.rb
Overview
The module of another type like T::Module[Foo].
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
: Type.
Instance Method Summary collapse
-
#==(other) ⇒ Object
: (BasicObject other) -> bool.
-
#initialize(type) ⇒ Module
constructor
: (Type type) -> void.
-
#normalize ⇒ Object
: -> Type.
-
#simplify ⇒ Object
: -> Type.
-
#to_rbi ⇒ Object
: -> String.
Constructor Details
#initialize(type) ⇒ Module
: (Type type) -> void
283 284 285 286 |
# File 'lib/rbi/type.rb', line 283 def initialize(type) super() @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
: Type
280 281 282 |
# File 'lib/rbi/type.rb', line 280 def type @type end |
Instance Method Details
#==(other) ⇒ Object
: (BasicObject other) -> bool
290 291 292 |
# File 'lib/rbi/type.rb', line 290 def ==(other) Module === other && @type == other.type end |
#normalize ⇒ Object
: -> Type
302 303 304 |
# File 'lib/rbi/type.rb', line 302 def normalize self end |
#simplify ⇒ Object
: -> Type
308 309 310 |
# File 'lib/rbi/type.rb', line 308 def simplify self end |
#to_rbi ⇒ Object
: -> String
296 297 298 |
# File 'lib/rbi/type.rb', line 296 def to_rbi "::T::Module[#{@type}]" end |