Class: XDry::Boxing::DateConverter
Instance Method Summary collapse
- #box(out, data_expr, tempvar_prefix) ⇒ Object
- #retain_policy ⇒ Object
- #unbox(out, object_expr, tempvar_prefix) ⇒ Object
Methods inherited from Boxer
Instance Method Details
#box(out, data_expr, tempvar_prefix) ⇒ Object
99 100 101 |
# File 'lib/xdry/boxing.rb', line 99 def box out, data_expr, tempvar_prefix SIMPLE_CONVERTIONS['double'].box out, "[#{data_expr} timeIntervalSinceReferenceDate]" end |
#retain_policy ⇒ Object
108 |
# File 'lib/xdry/boxing.rb', line 108 def retain_policy; RetainPolicy::RETAIN; end |
#unbox(out, object_expr, tempvar_prefix) ⇒ Object
103 104 105 106 |
# File 'lib/xdry/boxing.rb', line 103 def unbox out, object_expr, tempvar_prefix number = SIMPLE_CONVERTIONS['double'].unbox(out, object_expr) "[NSDate dateWithTimeIntervalSinceReferenceDate:#{number}]" end |