Class: RelatonBib::EditorialGroup
Constant Summary
Constants included
from RelatonBib
VERSION
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from RelatonBib
array, format_date, grammar_hash, parse_date, parse_yaml
Methods included from Config
#configuration, #configure
Constructor Details
#initialize(technical_committee) ⇒ EditorialGroup
Returns a new instance of EditorialGroup.
11
12
13
|
# File 'lib/relaton_bib/editorial_group.rb', line 11
def initialize(technical_committee)
@technical_committee = technical_committee
end
|
Instance Attribute Details
8
9
10
|
# File 'lib/relaton_bib/editorial_group.rb', line 8
def technical_committee
@technical_committee
end
|
Instance Method Details
#presence? ⇒ true
37
38
39
|
# File 'lib/relaton_bib/editorial_group.rb', line 37
def presence?
technical_committee.any?
end
|
#to_asciibib(prefix = "") ⇒ String
29
30
31
32
33
34
|
# File 'lib/relaton_bib/editorial_group.rb', line 29
def to_asciibib(prefix = "")
pref = prefix.empty? ? "editorialgroup" : "#{prefix}.editorialgroup"
technical_committee.map do |tc|
tc.to_asciibib pref, technical_committee.size
end.join
end
|
#to_hash ⇒ Hash
23
24
25
|
# File 'lib/relaton_bib/editorial_group.rb', line 23
def to_hash
single_element_array technical_committee
end
|
#to_xml(builder) ⇒ Object
16
17
18
19
20
|
# File 'lib/relaton_bib/editorial_group.rb', line 16
def to_xml(builder)
builder.editorialgroup do |b|
technical_committee.each { |tc| tc.to_xml b }
end
end
|