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)


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

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)


21
22
23
# File 'lib/relaton_bib/technical_committee.rb', line 21

def to_hash
  workgroup.to_hash
end

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


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

def to_xml(builder)
  builder.send "technical-committee" do |b|
    workgroup.to_xml b
  end
end