Class: IsoBibItem::DocumentIdentifier
- Inherits:
-
Object
- Object
- IsoBibItem::DocumentIdentifier
- Defined in:
- lib/iso_bib_item/bibliographic_item.rb
Overview
Document identifier.
Instance Attribute Summary collapse
- #id ⇒ String readonly
- #type ⇒ String readonly
Instance Method Summary collapse
-
#initialize(id:, type:) ⇒ DocumentIdentifier
constructor
A new instance of DocumentIdentifier.
-
#to_xml(builder) ⇒ Object
Add docidentifier xml element.
Constructor Details
#initialize(id:, type:) ⇒ DocumentIdentifier
Returns a new instance of DocumentIdentifier.
31 32 33 34 |
# File 'lib/iso_bib_item/bibliographic_item.rb', line 31 def initialize(id:, type:) @id = id @type = type end |
Instance Attribute Details
#id ⇒ String (readonly)
26 27 28 |
# File 'lib/iso_bib_item/bibliographic_item.rb', line 26 def id @id end |
#type ⇒ String (readonly)
29 30 31 |
# File 'lib/iso_bib_item/bibliographic_item.rb', line 29 def type @type end |
Instance Method Details
#to_xml(builder) ⇒ Object
Add docidentifier xml element
41 42 43 |
# File 'lib/iso_bib_item/bibliographic_item.rb', line 41 def to_xml(builder) builder.docidentifier(id, type: type) end |