class Decode::Comment::Tag

Attributes

directive[R]

The directive that generated the tag. @attribute [String]

Public Class Methods

match(text) click to toggle source
# File lib/decode/comment/tag.rb, line 26
def self.match(text)
        self::PATTERN.match(text)
end
new(directive) click to toggle source
# File lib/decode/comment/tag.rb, line 45
def initialize(directive)
        @directive = directive
end
parse(directive, text, lines, tags, level = 0) click to toggle source
# File lib/decode/comment/tag.rb, line 30
def self.parse(directive, text, lines, tags, level = 0)
        if match = self.match(text)
                node = self.build(directive, match)
                
                tags.parse(lines, level + 1) do |child|
                        node.add(child)
                end
                
                return node
        else
                # Consume all nested nodes:
                tags.ignore(lines, level + 1)
        end
end