Class: RelatonBib::StructuredIdentifierCollection
Constant Summary
Constants included from RelatonBib
Instance Method Summary collapse
- #all_parts ⇒ Object
-
#initialize(collection) ⇒ StructuredIdentifierCollection
constructor
A new instance of StructuredIdentifierCollection.
- #presence? ⇒ Boolean
-
#remove_date ⇒ Object
remoe year from docnumber.
- #remove_part ⇒ Object
- #to_hash ⇒ Array<Hash>
- #to_xml(builder) ⇒ Object
Methods included from RelatonBib
Constructor Details
#initialize(collection) ⇒ StructuredIdentifierCollection
Returns a new instance of StructuredIdentifierCollection.
9 10 11 |
# File 'lib/relaton_bib/structured_identifier.rb', line 9 def initialize(collection) @collection = collection end |
Instance Method Details
#all_parts ⇒ Object
32 33 34 |
# File 'lib/relaton_bib/structured_identifier.rb', line 32 def all_parts @collection.each &:all_parts end |
#presence? ⇒ Boolean
36 37 38 |
# File 'lib/relaton_bib/structured_identifier.rb', line 36 def presence? any? end |
#remove_date ⇒ Object
remoe year from docnumber
24 25 26 |
# File 'lib/relaton_bib/structured_identifier.rb', line 24 def remove_date @collection.each &:remove_date end |
#remove_part ⇒ Object
28 29 30 |
# File 'lib/relaton_bib/structured_identifier.rb', line 28 def remove_part @collection.each &:remove_part end |
#to_hash ⇒ Array<Hash>
19 20 21 |
# File 'lib/relaton_bib/structured_identifier.rb', line 19 def to_hash single_element_array @collection end |
#to_xml(builder) ⇒ Object
14 15 16 |
# File 'lib/relaton_bib/structured_identifier.rb', line 14 def to_xml(builder) @collection.each { |si| si.to_xml builder } end |