Method: Coradoc::Element::Block::Literal#initialize

Defined in:
lib/coradoc/element/block/literal.rb

#initialize(title, options = {}) ⇒ Literal

Returns a new instance of Literal.



5
6
7
8
9
10
11
12
13
# File 'lib/coradoc/element/block/literal.rb', line 5

def initialize(title, options = {})
  @title = title
  @id = options.fetch(:id, nil)
  @anchor = @id.nil? ? nil : Inline::Anchor.new(@id)
  @attributes = options.fetch(:attributes, AttributeList.new)
  @lines = options.fetch(:lines, [])
  @delimiter_char = "."
  @delimiter_len = options.fetch(:delimiter_len, 4)
end