class Decode::Documentation

Structured access to a set of comment lines.

Attributes

comments[R]

The underlying comments from which the documentation is extracted. @attribute [Array(String)]

language[R]

The language in which the documentation was extracted from. @attribute [Language::Generic]

Public Class Methods

new(comments, language = nil) click to toggle source

Initialize the documentation with an array of comments, within a specific language.

@parameter comments [Array(String)] An array of comment lines. @parameter language [Language] The language in which the comments were extracted.

# File lib/decode/documentation.rb, line 39
def initialize(comments, language = nil)
        @comments = comments
        @language = language
        
        language.tags.parse(@comments.dup) do |node|
                self.add(node)
        end
end