DecodeSourceDecodeCommentPragma

class Pragma

Asserts a specific property about the method signature.

Definitions

def self.parse(directive, text, lines, tags, level = 0)

Parse a pragma directive from text.

Signature

parameter directive String

The directive name.

parameter text String

The directive text.

parameter lines Array(String)

The remaining lines.

parameter tags Array(Tag)

The collection of tags.

parameter level Integer

The indentation level.

Implementation

def self.parse(directive, text, lines, tags, level = 0)
	self.build(directive, text)
end

def self.build(directive, text)

Build a pragma from a directive and text.

Signature

parameter directive String

The directive name.

parameter text String

The directive text.

Implementation

def self.build(directive, text)
	node = self.new(directive)
	
	if text
		node.add(Text.new(text))
	end
	
	return node
end

def initialize(directive)

Initialize a new pragma.

Signature

parameter directive String

The directive name.

Implementation

def initialize(directive)
	super(directive)
end