Class: MessagePack::IDL::IR::NullableType

Inherits:
ParameterizedType show all
Defined in:
lib/msgpack/idl/ir.rb

Instance Attribute Summary

Attributes inherited from ParameterizedType

#generic_type, #type_params

Instance Method Summary collapse

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

Returns:

  • (Boolean)


161
162
163
# File 'lib/msgpack/idl/ir.rb', line 161

def nullable_type?
	true
end

#real_typeObject



165
166
167
# File 'lib/msgpack/idl/ir.rb', line 165

def real_type
	@type_params[0].real_type
end