Class: Coradoc::Input::Html::Converters::Head
- Inherits:
-
Base
- Object
- Base
- Coradoc::Input::Html::Converters::Head
show all
- Defined in:
- lib/coradoc/html/input/converters/head.rb
Constant Summary
collapse
- INSTANCE =
new
Instance Method Summary
collapse
Methods inherited from Base
#extract_leading_trailing_whitespace, #extract_text_from_content, #node_has_ancestor?, #textnode_after_start_with?, #textnode_before_end_with?, #treat_children_coradoc, #treat_coradoc, #unconstrained_after?, #unconstrained_before?
Instance Method Details
19
20
21
22
23
24
|
# File 'lib/coradoc/html/input/converters/head.rb', line 19
def (node)
title = node.at('./title')
return '(???)' if title.nil?
title.text
end
|
#to_coradoc(node, _state = {}) ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/coradoc/html/input/converters/head.rb', line 10
def to_coradoc(node, _state = {})
title = (node)
Coradoc::CoreModel::DocumentElement.new(
title: title,
level: 0
)
end
|