Sha256: 6f6f08a9d3b24f94f201c5a70a2e6777b6e8ea5138f06fc801a9893b6b991381
Contents?: true
Size: 558 Bytes
Versions: 30
Compression:
Stored size: 558 Bytes
Contents
module Pacer class SimpleEncoder JBoolean = java.lang.Boolean JDate = java.util.Date JFalse = false.to_java def self.encode_property(value) if value.is_a? String value = value.strip value unless value == '' elsif false == value JFalse else value end end def self.decode_property(value) if value.is_a? JBoolean and value == JFalse false elsif value.is_a? JDate Time.at value.getTime() / 1000.0 else value end end end end
Version data entries
30 entries across 30 versions & 1 rubygems