Class: Coradoc::Document::Admonition
- Inherits:
-
Object
- Object
- Coradoc::Document::Admonition
- Defined in:
- lib/coradoc/document/admonition.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#line_break ⇒ Object
readonly
Returns the value of attribute line_break.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(content, type, options = {}) ⇒ Admonition
constructor
A new instance of Admonition.
Constructor Details
#initialize(content, type, options = {}) ⇒ Admonition
Returns a new instance of Admonition.
5 6 7 8 9 |
# File 'lib/coradoc/document/admonition.rb', line 5 def initialize(content, type, = {}) @content = content @type = type.downcase.to_sym @line_break = .fetch(:line_break, "") end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
3 4 5 |
# File 'lib/coradoc/document/admonition.rb', line 3 def content @content end |
#line_break ⇒ Object (readonly)
Returns the value of attribute line_break.
3 4 5 |
# File 'lib/coradoc/document/admonition.rb', line 3 def line_break @line_break end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/coradoc/document/admonition.rb', line 3 def type @type end |