Class: Decode::Documentation
- Inherits:
-
Comment::Node
- Object
- Comment::Node
- Decode::Documentation
- Defined in:
- lib/decode/documentation.rb
Overview
Structured access to a set of comment lines.
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
- #The language in which the documentation was extracted from.(language) ⇒ Object readonly
- #The underlying comments from which the documentation is extracted.(underlyingcommentsfromwhichthedocumentationisextracted.) ⇒ Object readonly
Attributes inherited from Comment::Node
#The children of this node., #children
Instance Method Summary collapse
-
#initialize(comments, language) ⇒ Documentation
constructor
Initialize the documentation with an array of comments, within a specific language.
Methods inherited from Comment::Node
#add, #children?, #each, #filter, #text, #traverse
Constructor Details
#initialize(comments, language) ⇒ Documentation
Initialize the documentation with an array of comments, within a specific language.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/decode/documentation.rb', line 27 def initialize(comments, language) super(nil) @comments = comments @language = language if language language..parse(@comments.dup) do |node| self.add(node) end end end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
41 42 43 |
# File 'lib/decode/documentation.rb', line 41 def comments @comments end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
44 45 46 |
# File 'lib/decode/documentation.rb', line 44 def language @language end |
#The language in which the documentation was extracted from.(language) ⇒ Object (readonly)
44 |
# File 'lib/decode/documentation.rb', line 44 attr :language |
#The underlying comments from which the documentation is extracted.(underlyingcommentsfromwhichthedocumentationisextracted.) ⇒ Object (readonly)
41 |
# File 'lib/decode/documentation.rb', line 41 attr :comments |