Class: RelatonIso::DocumentIdentifier
- Inherits:
-
RelatonBib::DocumentIdentifier
- Object
- RelatonBib::DocumentIdentifier
- RelatonIso::DocumentIdentifier
- Defined in:
- lib/relaton_iso/document_identifier.rb
Instance Method Summary collapse
Instance Method Details
#all_parts ⇒ Object
23 24 25 |
# File 'lib/relaton_iso/document_identifier.rb', line 23 def all_parts @all_parts = true end |
#id ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/relaton_iso/document_identifier.rb', line 3 def id id_str = @id.to_s.sub(/\sED\d+/, "").squeeze(" ").sub(/^ISO\/\s/, "ISO ") # workarounds for pubid gem bugs if @all_parts if type == "URN" return "#{@id.urn}:ser" else return "#{id_str} (all parts)" end end type == "URN" ? @id.urn.to_s : id_str end |
#remove_date ⇒ Object
19 20 21 |
# File 'lib/relaton_iso/document_identifier.rb', line 19 def remove_date @id.year = nil end |
#remove_part ⇒ Object
15 16 17 |
# File 'lib/relaton_iso/document_identifier.rb', line 15 def remove_part @id.part = nil end |