Class: Metanorma::Html::Drops::BiblioEntryDrop

Inherits:
Liquid::Drop
  • Object
show all
Defined in:
lib/metanorma/html/drops/biblio_entry_drop.rb

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ BiblioEntryDrop

Returns a new instance of BiblioEntryDrop.



7
8
9
10
11
12
13
14
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 7

def initialize(attrs)
  @id = attrs[:id]
  @css_class = attrs[:css_class]
  @ordinal_html = attrs[:ordinal_html]
  @pubid_html = attrs[:pubid_html]
  @url = attrs[:url]
  @content_html = attrs[:content_html]
end

Instance Method Details

#content_htmlObject



36
37
38
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 36

def content_html
  @content_html
end

#css_classObject



20
21
22
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 20

def css_class
  @css_class
end

#has_ordinalObject



40
41
42
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 40

def has_ordinal
  !@ordinal_html.nil? && !@ordinal_html.empty?
end

#has_urlObject



44
45
46
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 44

def has_url
  !@url.nil? && !@url.empty?
end

#idObject



16
17
18
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 16

def id
  @id
end

#ordinal_htmlObject



24
25
26
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 24

def ordinal_html
  @ordinal_html
end

#pubid_htmlObject



28
29
30
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 28

def pubid_html
  @pubid_html
end

#urlObject



32
33
34
# File 'lib/metanorma/html/drops/biblio_entry_drop.rb', line 32

def url
  @url
end