Method: Coradoc::Element::Block::Core#initialize

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

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

Returns a new instance of Core.



11
12
13
14
15
16
17
18
19
20
# File 'lib/coradoc/element/block/core.rb', line 11

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