Class: Coradoc::Element::Block::Quote
- Defined in:
- lib/coradoc/element/block/quote.rb
Instance Attribute Summary
Attributes inherited from Core
#attributes, #id, #lang, #lines, #title
Instance Method Summary collapse
-
#initialize(title, options = {}) ⇒ Quote
constructor
A new instance of Quote.
- #to_adoc ⇒ Object
Methods inherited from Core
#gen_anchor, #gen_attributes, #gen_delimiter, #gen_lines, #gen_title, #type
Constructor Details
#initialize(title, options = {}) ⇒ Quote
Returns a new instance of Quote.
5 6 7 8 9 10 11 |
# File 'lib/coradoc/element/block/quote.rb', line 5 def initialize(title, = {}) @title = title @attributes = .fetch(:attributes, {}) @lines = .fetch(:lines, []) @delimiter_char = "_" @delimiter_len = .fetch(:delimiter_len, 4) end |
Instance Method Details
#to_adoc ⇒ Object
13 14 15 |
# File 'lib/coradoc/element/block/quote.rb', line 13 def to_adoc "\n\n#{gen_attributes}#{gen_delimiter}\n" << gen_lines << "\n#{gen_delimiter}\n\n" end |