Class: IsoBibItem::DocRelationCollection
- Defined in:
- lib/iso_bib_item/document_relation_collection.rb
Overview
Document relations collection
Instance Method Summary collapse
-
#initialize(relations) ⇒ DocRelationCollection
constructor
A new instance of DocRelationCollection.
- #replaces ⇒ Array<IsoBibItem::DocumentRelation>
Methods inherited from Array
Constructor Details
#initialize(relations) ⇒ DocRelationCollection
Returns a new instance of DocRelationCollection.
108 109 110 |
# File 'lib/iso_bib_item/document_relation_collection.rb', line 108 def initialize(relations) super relations.map { |r| r.is_a?(Hash) ? DocumentRelation.new(r) : r } end |
Instance Method Details
#replaces ⇒ Array<IsoBibItem::DocumentRelation>
113 114 115 |
# File 'lib/iso_bib_item/document_relation_collection.rb', line 113 def replaces select { |r| r.type == 'replace' } end |