Class: Coradoc::Html::Drop::AnnotationDrop
- Inherits:
-
Base
- Object
- Liquid::Drop
- Base
- Coradoc::Html::Drop::AnnotationDrop
show all
- Defined in:
- lib/coradoc/html/drop/annotation_drop.rb
Instance Attribute Summary
Attributes inherited from Base
#model
Instance Method Summary
collapse
Methods inherited from Base
#id, #initialize, #title, #to_liquid
Instance Method Details
#annotation_type ⇒ Object
11
12
13
|
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 11
def annotation_type
(@model.annotation_type || 'note').to_s.downcase
end
|
#content ⇒ Object
19
20
21
|
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 19
def content
content_to_liquid(@model.renderable_content)
end
|
#css_class ⇒ Object
23
24
25
|
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 23
def css_class
"admonitionblock #{annotation_type}"
end
|
#label ⇒ Object
15
16
17
|
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 15
def label
Escape.escape_html(@model.annotation_label || annotation_type.upcase)
end
|
#template_type ⇒ Object
7
8
9
|
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 7
def template_type
'annotation_block'
end
|