Class: RelatonIso::DocumentIdentifier

Inherits:
RelatonBib::DocumentIdentifier
  • Object
show all
Defined in:
lib/relaton_iso/document_identifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#all_partsObject

Returns the value of attribute all_parts.



3
4
5
# File 'lib/relaton_iso/document_identifier.rb', line 3

def all_parts
  @all_parts
end

Instance Method Details

#idObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/relaton_iso/document_identifier.rb', line 5

def id
  if @all_parts
    if type == "URN"
      return "#{@id.urn}:ser"
        else
      return "#{@id} (all parts)"
    end
  end
  type == "URN" ? @id.urn.to_s : @id.to_s
end

#remove_dateObject



20
21
22
# File 'lib/relaton_iso/document_identifier.rb', line 20

def remove_date
  @id.year = nil
end

#remove_partObject



16
17
18
# File 'lib/relaton_iso/document_identifier.rb', line 16

def remove_part
  @id.part = nil
end