Class: Coradoc::Element::Comment::Line
- Defined in:
- lib/coradoc/element/comment_line.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, options = {}) ⇒ Line
constructor
A new instance of Line.
- #to_adoc ⇒ Object
Methods inherited from Base
#children_accessors, children_accessors, declare_children, #simplify_block_content, visit, #visit
Constructor Details
#initialize(text, options = {}) ⇒ Line
Returns a new instance of Line.
7 8 9 10 |
# File 'lib/coradoc/element/comment_line.rb', line 7 def initialize(text, = {}) @text = text @line_break = .fetch(:line_break, "\n") end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/coradoc/element/comment_line.rb', line 5 def text @text end |
Instance Method Details
#to_adoc ⇒ Object
12 13 14 |
# File 'lib/coradoc/element/comment_line.rb', line 12 def to_adoc "// #{@text}#{@line_break}" end |