class Transit::ReadHandlers::SpecialNumbersHandler

Public Instance Methods

from_rep(v) click to toggle source
# File lib/transit/read_handlers.rb, line 46
def from_rep(v)
  case v
  when "NaN"  then  Float::NAN
  when "INF"  then  Float::INFINITY
  when "-INF" then -Float::INFINITY
  else raise ArgumentError.new("Don't know how to handle #{v.inspect} for the \"z\" tag")
  end
end