Class: Catalog::Otu::EntryItem

Inherits:
EntryItem show all
Defined in:
lib/catalog/otu/entry_item.rb

Instance Attribute Summary

Attributes inherited from EntryItem

#base_object, #citation, #is_first, #is_last, #matches_current_target, #nomenclature_date, #object, #pages, #to_html_method, #year_suffix

Instance Method Summary collapse

Methods inherited from EntryItem

#base_data_attributes, #cited?, #cited_class, #in_source?, #initialize, #object_class, #origin, #references_self?, #source, #topics

Constructor Details

This class inherits a constructor from Catalog::EntryItem

Instance Method Details

#data_attributesObject



12
13
14
15
16
17
# File 'lib/catalog/otu/entry_item.rb', line 12

def data_attributes
  base_data_attributes.merge(
    'history-otu-taxon-name-id' => taxon_name_global_id,
    'history-is-valid' => linked_to_valid_taxon_name?
  )
end

#html_helperObject



3
4
5
# File 'lib/catalog/otu/entry_item.rb', line 3

def html_helper
  :otu_catalog_entry_item_tag
end

#linked_to_valid_taxon_name?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/catalog/otu/entry_item.rb', line 8

def linked_to_valid_taxon_name?
  object.taxon_name&.is_valid? 
end

#taxon_name_global_idObject



19
20
21
# File 'lib/catalog/otu/entry_item.rb', line 19

def taxon_name_global_id
  object&.taxon_name&.to_global_id&.to_s
end