Class: Relaton::Bsi::ItemData
- Inherits:
-
Iso::ItemData
- Object
- Iso::ItemData
- Relaton::Bsi::ItemData
- Defined in:
- lib/relaton/bsi/item_data.rb
Instance Method Summary collapse
Instance Method Details
#create_id(without_date: false) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/relaton/bsi/item_data.rb', line 4 def create_id(without_date: false) docid = docidentifier.find(&:primary) || docidentifier.first return unless docid id_content = without_date ? docid.content.sub(/:\d{4}$/, "") : docid.content self.id = id_content.gsub(/\W+/, "") end |