Class: Coradoc::Html::Drop::TermDrop

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/html/drop/term_drop.rb

Instance Attribute Summary

Attributes inherited from Base

#model

Instance Method Summary collapse

Methods inherited from Base

#id, #initialize, #template_type, #title, #to_liquid

Constructor Details

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

Instance Method Details

#css_classObject



15
16
17
18
# File 'lib/coradoc/html/drop/term_drop.rb', line 15

def css_class
  t = @model.type || 'term'
  "term term-#{t}"
end

#term_refObject



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

def term_ref
  @model.text.to_s
end

#textObject



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

def text
  Escape.escape_html(@model.text.to_s)
end