Module: CBOR_DIAG::Fnumber4

Defined in:
lib/cbor-diag-parser.rb

Instance Method Summary collapse

Instance Method Details

#to_rbObject



290
291
292
293
294
295
296
# File 'lib/cbor-diag-parser.rb', line 290

def to_rb
  if dp.empty? && ep.empty?
    ip.text_value.to_i
  else
    (ip.text_value + dp.text_value + ep.text_value).to_f
  end
end