Class: Cnccs::Ccs

Inherits:
Object
  • Object
show all
Defined in:
lib/relaton_gb/ccs.rb

Instance Method Summary collapse

Instance Method Details

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

Parameters:

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

Returns:

  • (String)


11
12
13
14
15
16
17
18
# File 'lib/relaton_gb/ccs.rb', line 11

def to_aciibib(prefix = "", count = 1)
  pref = prefix.empty? ? prefix : prefix + "."
  pref += "ccs"
  out = count > 1 ? "#{pref}::\n" : ""
  out += "#{pref}.code:: #{code}\n" if code
  out += "#{pref}.description:: #{description}\n" if description
  out
end

#to_hashHash

Returns:

  • (Hash)


4
5
6
# File 'lib/relaton_gb/ccs.rb', line 4

def to_hash
  { "code" => code }
end