Class: IsoBibItem::Contact
- Inherits:
-
Object
- Object
- IsoBibItem::Contact
- Defined in:
- lib/iso_bib_item/contributor.rb
Overview
Contact class.
Instance Attribute Summary collapse
-
#type ⇒ String
readonly
Allowed “phone”, “email” or “uri”.
- #value ⇒ String readonly
Instance Method Summary collapse
-
#initialize(type:, value:) ⇒ Contact
constructor
A new instance of Contact.
- #to_xml(doc) ⇒ Object
Constructor Details
#initialize(type:, value:) ⇒ Contact
Returns a new instance of Contact.
57 58 59 60 |
# File 'lib/iso_bib_item/contributor.rb', line 57 def initialize(type:, value:) @type = type @value = value end |
Instance Attribute Details
#type ⇒ String (readonly)
Returns allowed “phone”, “email” or “uri”.
51 52 53 |
# File 'lib/iso_bib_item/contributor.rb', line 51 def type @type end |
#value ⇒ String (readonly)
54 55 56 |
# File 'lib/iso_bib_item/contributor.rb', line 54 def value @value end |
Instance Method Details
#to_xml(doc) ⇒ Object
63 64 65 |
# File 'lib/iso_bib_item/contributor.rb', line 63 def to_xml(doc) doc.send type, value end |