Class: IsoBibItem::IsoDocumentId

Inherits:
Object
  • Object
show all
Defined in:
lib/iso_bib_item/iso_bibliographic_item.rb

Overview

Iso document id.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_number:, part_number:) ⇒ IsoDocumentId

Returns a new instance of IsoDocumentId.

Parameters:

  • project_number (Integer)
  • part_number (Integer)


34
35
36
37
# File 'lib/iso_bib_item/iso_bibliographic_item.rb', line 34

def initialize(project_number:, part_number:)
  @project_number = project_number
  @part_number    = part_number
end

Instance Attribute Details

#part_numberInteger (readonly)

Returns:

  • (Integer)


30
31
32
# File 'lib/iso_bib_item/iso_bibliographic_item.rb', line 30

def part_number
  @part_number
end

#project_numberInteger (readonly)

Returns:

  • (Integer)


27
28
29
# File 'lib/iso_bib_item/iso_bibliographic_item.rb', line 27

def project_number
  @project_number
end

#tc_document_numberInteger (readonly)

Returns:

  • (Integer)


24
25
26
# File 'lib/iso_bib_item/iso_bibliographic_item.rb', line 24

def tc_document_number
  @tc_document_number
end

Instance Method Details

#remove_partObject



39
40
41
# File 'lib/iso_bib_item/iso_bibliographic_item.rb', line 39

def remove_part
  @part_number = nil
end

#to_xml(builder) ⇒ Object



43
44
45
# File 'lib/iso_bib_item/iso_bibliographic_item.rb', line 43

def to_xml(builder)
  builder.docidentifier(project_number + '-' + part_number)
end