class J2119::Deduce
Public Class Methods
value(val)
click to toggle source
we have to deduce the JSON value from they way they expressed it as
text in the J2119 file.
# File lib/j2119/deduce.rb, line 21 def self.value(val) case val when /^"(.*)"$/ $1 when 'true' true when 'false' false when 'null' nil when /^\d+$/ val.to_i else val.to_f end end