Class: RelatonBib::BibliographicItem::Version
- Inherits:
-
Object
- Object
- RelatonBib::BibliographicItem::Version
- Defined in:
- lib/relaton_bib/biblio_version.rb
Instance Attribute Summary collapse
- #draft ⇒ Array<String> readonly
- #revision_date ⇒ String readonly
Instance Method Summary collapse
-
#initialize(revision_date = nil, draft = []) ⇒ Version
constructor
A new instance of Version.
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(revision_date = nil, draft = []) ⇒ Version
Returns a new instance of Version.
22 23 24 25 |
# File 'lib/relaton_bib/biblio_version.rb', line 22 def initialize(revision_date = nil, draft = []) @revision_date = revision_date @draft = draft end |
Instance Attribute Details
#draft ⇒ Array<String> (readonly)
18 19 20 |
# File 'lib/relaton_bib/biblio_version.rb', line 18 def draft @draft end |
#revision_date ⇒ String (readonly)
15 16 17 |
# File 'lib/relaton_bib/biblio_version.rb', line 15 def revision_date @revision_date end |
Instance Method Details
#to_xml(builder) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/relaton_bib/biblio_version.rb', line 28 def to_xml(builder) builder.version do builder.revision_date revision_date if revision_date draft.each { |d| builder.draft d } end end |