class RubyRunJs::JsDate
Attributes
rb_time[R]
Public Class Methods
new(value, prototype)
click to toggle source
Calls superclass method
RubyRunJs::JsBaseObject::new
# File lib/ruby_run_js/objects/js_date.rb, line 9 def initialize(value, prototype) super() @prototype = prototype set_value(value) @_class = 'Date' end
Public Instance Methods
set_value(value)
click to toggle source
# File lib/ruby_run_js/objects/js_date.rb, line 16 def set_value(value) @value = value @rb_time = value != value ? nil : Time.at(value / 1000.0) end