Class: MessagePack::IDL::IR::ParameterizedType
- Inherits:
-
Type
- Object
- Type
- MessagePack::IDL::IR::ParameterizedType
show all
- Defined in:
- lib/msgpack/idl/ir.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Type
#nullable_type?, #real_type, #void_type?
Constructor Details
#initialize(type_params, generic_type) ⇒ ParameterizedType
Returns a new instance of ParameterizedType.
97
98
99
100
|
# File 'lib/msgpack/idl/ir.rb', line 97
def initialize(type_params, generic_type)
@generic_type = generic_type
@type_params = type_params
end
|
Instance Attribute Details
#generic_type ⇒ Object
Returns the value of attribute generic_type.
101
102
103
|
# File 'lib/msgpack/idl/ir.rb', line 101
def generic_type
@generic_type
end
|
#type_params ⇒ Object
Returns the value of attribute type_params.
101
102
103
|
# File 'lib/msgpack/idl/ir.rb', line 101
def type_params
@type_params
end
|
Instance Method Details
#==(o) ⇒ Object
119
120
121
122
|
# File 'lib/msgpack/idl/ir.rb', line 119
def ==(o)
o.is_a?(ParameterizedType) && @generic_type == o.generic_type &&
@type_params == o.type_params
end
|
#list_type? ⇒ Boolean
111
112
113
|
# File 'lib/msgpack/idl/ir.rb', line 111
def list_type?
@generic_type == Primitive.list
end
|
#map_type? ⇒ Boolean
115
116
117
|
# File 'lib/msgpack/idl/ir.rb', line 115
def map_type?
@generic_type == Primitive.map
end
|
#name ⇒ Object
103
104
105
|
# File 'lib/msgpack/idl/ir.rb', line 103
def name
@generic_type.name
end
|
#parameterized_type? ⇒ Boolean
107
108
109
|
# File 'lib/msgpack/idl/ir.rb', line 107
def parameterized_type?
true
end
|