Class: MessagePack::IDL::IR::NullableType
- Inherits:
-
ParameterizedType
- Object
- Type
- ParameterizedType
- MessagePack::IDL::IR::NullableType
- Defined in:
- lib/msgpack/idl/ir.rb
Instance Attribute Summary
Attributes inherited from ParameterizedType
Instance Method Summary collapse
-
#initialize(type) ⇒ NullableType
constructor
A new instance of NullableType.
- #nullable_type? ⇒ Boolean
- #real_type ⇒ Object
Methods inherited from ParameterizedType
#==, #list_type?, #map_type?, #name, #parameterized_type?
Methods inherited from Type
#list_type?, #map_type?, #parameterized_type?, #void_type?
Constructor Details
#initialize(type) ⇒ NullableType
Returns a new instance of NullableType.
157 158 159 |
# File 'lib/msgpack/idl/ir.rb', line 157 def initialize(type) super([type], Primitive.nullable) end |
Instance Method Details
#nullable_type? ⇒ Boolean
161 162 163 |
# File 'lib/msgpack/idl/ir.rb', line 161 def nullable_type? true end |
#real_type ⇒ Object
165 166 167 |
# File 'lib/msgpack/idl/ir.rb', line 165 def real_type @type_params[0].real_type end |