Class: RBI::Type::Module
Overview
The module of another type like ‘T::Module`.
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.
Methods inherited from RBI::Type
all, any, anything, attached_class, boolean, class_of, #eql?, generic, #hash, #nilable, nilable, #nilable?, #non_nilable, noreturn, parse_node, parse_string, proc, #rbs_string, self_type, shape, simple, t_class, t_module, #to_s, tuple, type_alias, type_parameter, untyped, void
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 |