Class: RelatonBib::Contact
- Inherits:
-
Object
- Object
- RelatonBib::Contact
- Defined in:
- lib/relaton_bib/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.
83 84 85 86 |
# File 'lib/relaton_bib/contributor.rb', line 83 def initialize(type:, value:) @type = type @value = value end |
Instance Attribute Details
#type ⇒ String (readonly)
Returns allowed “phone”, “email” or “uri”.
77 78 79 |
# File 'lib/relaton_bib/contributor.rb', line 77 def type @type end |
#value ⇒ String (readonly)
80 81 82 |
# File 'lib/relaton_bib/contributor.rb', line 80 def value @value end |
Instance Method Details
#to_xml(doc) ⇒ Object
89 90 91 |
# File 'lib/relaton_bib/contributor.rb', line 89 def to_xml(doc) doc.send type, value end |