Class: IsoBibItem::IsoDocumentId
- Inherits:
-
Object
- Object
- IsoBibItem::IsoDocumentId
- Defined in:
- lib/iso_bib_item/iso_bibliographic_item.rb
Overview
Iso document id.
Instance Attribute Summary collapse
- #part_number ⇒ Integer readonly
- #project_number ⇒ Integer readonly
- #tc_document_number ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(project_number:, part_number:) ⇒ IsoDocumentId
constructor
A new instance of IsoDocumentId.
- #remove_part ⇒ Object
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(project_number:, part_number:) ⇒ IsoDocumentId
Returns a new instance of IsoDocumentId.
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_number ⇒ Integer (readonly)
30 31 32 |
# File 'lib/iso_bib_item/iso_bibliographic_item.rb', line 30 def part_number @part_number end |
#project_number ⇒ Integer (readonly)
27 28 29 |
# File 'lib/iso_bib_item/iso_bibliographic_item.rb', line 27 def project_number @project_number end |
#tc_document_number ⇒ Integer (readonly)
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_part ⇒ Object
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 |