Class: Coradoc::Element::Comment::Block
- Defined in:
- lib/coradoc/element/comment_block.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, options = {}) ⇒ Block
constructor
A new instance of Block.
- #to_adoc ⇒ Object
Methods inherited from Base
#children_accessors, children_accessors, declare_children, #simplify_block_content, visit, #visit
Constructor Details
#initialize(text, options = {}) ⇒ Block
Returns a new instance of Block.
7 8 9 10 |
# File 'lib/coradoc/element/comment_block.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_block.rb', line 5 def text @text end |
Instance Method Details
#to_adoc ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/coradoc/element/comment_block.rb', line 12 def to_adoc <<~ADOC.chomp //// #{@text} ////#{@line_break} ADOC end |