class Transit::WriteHandlers::FloatHandler
Public Instance Methods
rep(f)
click to toggle source
# File lib/transit/write_handlers.rb, line 250 def rep(f) return "NaN" if f.nan? case f when Float::INFINITY then "INF" when -Float::INFINITY then "-INF" else f end end
string_rep(f)
click to toggle source
# File lib/transit/write_handlers.rb, line 259 def string_rep(f) rep(f).to_s end
tag(f)
click to toggle source
# File lib/transit/write_handlers.rb, line 240 def tag(f) return "z" if f.nan? case f when Float::INFINITY, -Float::INFINITY "z" else "d" end end