Class: RelatonIho::EditorialGroupCollection
- Inherits:
-
Object
- Object
- RelatonIho::EditorialGroupCollection
- Extended by:
- Forwardable
- Includes:
- RelatonBib
- Defined in:
- lib/relaton_iho/editorial_group.rb
Instance Attribute Summary collapse
-
#collection ⇒ Array<RelatonIho::editorialgroup]
readonly
Array<RelatonIho::editorialgroup].
Instance Method Summary collapse
-
#initialize(collection) ⇒ EditorialGroupCollection
constructor
A new instance of EditorialGroupCollection.
- #presence? ⇒ Boolean
- #to_hash ⇒ Hash
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(collection) ⇒ EditorialGroupCollection
Returns a new instance of EditorialGroupCollection.
12 13 14 |
# File 'lib/relaton_iho/editorial_group.rb', line 12 def initialize(collection) @collection = collection end |
Instance Attribute Details
#collection ⇒ Array<RelatonIho::editorialgroup] (readonly)
Returns Array<RelatonIho::editorialgroup].
9 10 11 |
# File 'lib/relaton_iho/editorial_group.rb', line 9 def collection @collection end |
Instance Method Details
#presence? ⇒ Boolean
27 28 29 |
# File 'lib/relaton_iho/editorial_group.rb', line 27 def presence? any? end |
#to_hash ⇒ Hash
22 23 24 |
# File 'lib/relaton_iho/editorial_group.rb', line 22 def to_hash single_element_array collection end |
#to_xml(builder) ⇒ Object
17 18 19 |
# File 'lib/relaton_iho/editorial_group.rb', line 17 def to_xml(builder) collection.each { |eg| eg.to_xml builder } end |