Class: BCDString
Constant Summary
Constants inherited from String
String::ByteByByte, String::FirstChar
Instance Method Summary collapse
-
#initialize(value = nil) ⇒ BCDString
constructor
A new instance of BCDString.
Methods included from BCD
Methods inherited from String
#-, #=~, #__match__, #_rdoba_to_i, #consolize, #fe, #hexdump, #rmatch, #rom, #scanf, #scanf_re, #to_i, #to_re, #to_res
Constructor Details
#initialize(value = nil) ⇒ BCDString
Returns a new instance of BCDString.
51 52 53 54 55 |
# File 'lib/rdoba/bcd.rb', line 51 def initialize value = nil if value.is_a? Numeric self.replace BCD.parse( value ) else super value.to_s; end; end |