Class: Coradoc::Html::Drop::AnnotationDrop

Inherits:
Base
  • Object
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

Constructor Details

This class inherits a constructor from Coradoc::Html::Drop::Base

Instance Method Details

#annotation_typeObject



11
12
13
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 11

def annotation_type
  (@model.annotation_type || 'note').to_s.downcase
end

#contentObject



19
20
21
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 19

def content
  content_to_liquid(@model.renderable_content)
end

#css_classObject



23
24
25
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 23

def css_class
  "admonitionblock #{annotation_type}"
end

#labelObject



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_typeObject



7
8
9
# File 'lib/coradoc/html/drop/annotation_drop.rb', line 7

def template_type
  'annotation_block'
end