DecodeSourceDecodeCommentParameter

class Parameter

Represents a named method parameter.

Definitions

def self.build(directive, match)

Build a parameter from a directive and regex match.

Signature

parameter directive String

The original directive text.

parameter match MatchData

The regex match data containing name, type, and details.

returns Parameter

A new parameter object.

Implementation

def self.build(directive, match)
	node = self.new(directive, match[:name], match[:type])
	
	if details = match[:details]
		node.add(Text.new(details))
	end
	
	return node
end

def initialize(directive, name, type)

Initialize a new parameter.

Signature

parameter directive String

The original directive text.

parameter name String

The name of the parameter.

parameter type String

The type of the parameter.

Implementation

def initialize(directive, name, type)
	super(directive)
	
	@name = name
	@type = type
end

attr :name

Signature

attribute String

The name of the parameter.

attr :type

Signature

attribute String

The type of the parameter.