Class: MessagePack::IDL::AST::GenericType

Inherits:
Type
  • Object
show all
Defined in:
lib/msgpack/idl/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Type

#name, #nullable

Instance Method Summary collapse

Methods inherited from Type

#nullable?

Methods inherited from Element

#summary

Constructor Details

#initialize(name, type_params, nullable = false) ⇒ GenericType

Returns a new instance of GenericType.



284
285
286
287
# File 'lib/msgpack/idl/ast.rb', line 284

def initialize(name, type_params, nullable=false)
	super(name, nullable)
	@type_params = type_params
end

Instance Attribute Details

#type_paramsObject (readonly)

Returns the value of attribute type_params.



288
289
290
# File 'lib/msgpack/idl/ast.rb', line 288

def type_params
  @type_params
end

Instance Method Details

#textObject



290
291
292
# File 'lib/msgpack/idl/ast.rb', line 290

def text
	"#{super}<#{@type_params.map {|tp| tp.text }.join(',')}>"
end