Class: RelatonBib::TechnicalCommittee

Inherits:
Object
  • Object
show all
Defined in:
lib/relaton_bib/technical_committee.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workgroup) ⇒ TechnicalCommittee

Returns a new instance of TechnicalCommittee.

Parameters:



9
10
11
# File 'lib/relaton_bib/technical_committee.rb', line 9

def initialize(workgroup)
  @workgroup = workgroup
end

Instance Attribute Details

#workgroupRelatonBib::WorkGroup (readonly)



6
7
8
# File 'lib/relaton_bib/technical_committee.rb', line 6

def workgroup
  @workgroup
end

Instance Method Details

#to_asciibib(prefix = "", count = 1) ⇒ String

Parameters:

  • prefix (String) (defaults to: "")
  • count (Integer) (defaults to: 1)

    number of technical committees

Returns:

  • (String)


26
27
28
29
30
31
32
# File 'lib/relaton_bib/technical_committee.rb', line 26

def to_asciibib(prefix = "", count = 1)
  pref = prefix.empty? ? prefix : "#{prefix}."
  pref += "technical_committee"
  out = count > 1 ? "#{pref}::\n" : ""
  out += workgroup.to_asciibib pref
  out
end

#to_hashHash

Returns:

  • (Hash)


19
20
21
# File 'lib/relaton_bib/technical_committee.rb', line 19

def to_hash
  workgroup.to_hash
end

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


14
15
16
# File 'lib/relaton_bib/technical_committee.rb', line 14

def to_xml(builder)
  builder.send(:"technical-committee") { |b| workgroup.to_xml b }
end