Class: Coradoc::Document::Admonition

Inherits:
Object
  • Object
show all
Defined in:
lib/coradoc/document/admonition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @content = content
  @type = type.downcase.to_sym
  @line_break = options.fetch(:line_break, "")
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



3
4
5
# File 'lib/coradoc/document/admonition.rb', line 3

def content
  @content
end

#line_breakObject (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

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/coradoc/document/admonition.rb', line 3

def type
  @type
end