Class: Relaton::ThreeGpp::ItemData
- Inherits:
-
Bib::ItemData
- Object
- Bib::ItemData
- Relaton::ThreeGpp::ItemData
- Defined in:
- lib/relaton/3gpp/item_data.rb
Constant Summary
Constants inherited from Bib::ItemData
Bib::ItemData::ATTRIBUTES, Bib::ItemData::COLLECTION_ATTRBUTES, Bib::ItemData::COLLECTION_WRITE_ONLY_ATTRIBUTES
Instance Attribute Summary
Attributes inherited from Bib::ItemData
Instance Method Summary collapse
Methods inherited from Bib::ItemData
#abstract, #create_relation, #deep_clone, #delete_title_part!, #ext_remove_date, #ext_to_all_parts!, #initialize, #relation, #schema, #source, #title, #title_update_main, #to_all_parts, #to_asciibib, #to_bibtex, #to_h, #to_json, #to_most_recent_reference, #to_relation_item, #to_rfcxml, #to_xml, #to_yaml
Methods included from Bib::NamespaceHelper
Methods included from Core::ArrayWrapper
Constructor Details
This class inherits a constructor from Relaton::Bib::ItemData
Instance Method Details
#create_id(without_date: false) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/relaton/3gpp/item_data.rb', line 4 def create_id(without_date: false) return id if id && !id.empty? docid = find_primary_docid return unless docid pubid = without_date ? docid.content.sub(/:\d{4}$/, "") : docid.content self.id = pubid.to_s.sub(/\A3GPP\s+/, "").gsub(/\W+/, "") end |