Class: Codabel::Type::CommunicationType

Inherits:
Codabel::Type show all
Defined in:
lib/codabel/type/communication_type.rb

Instance Method Summary collapse

Methods inherited from Codabel::Type

#check!

Instance Method Details

#to_coda(value, length) ⇒ Object



4
5
6
7
8
# File 'lib/codabel/type/communication_type.rb', line 4

def to_coda(value, length)
  type = type_from(value)
  code = to_code(type)
  code.to_s.rjust(length, '0')
end