Class: Object

Inherits:
BasicObject
Defined in:
lib/to-javascript/encoders/object.rb

Instance Method Summary collapse

Instance Method Details

#as_jsObject



5
6
7
# File 'lib/to-javascript/encoders/object.rb', line 5

def as_js
  to_js
end

#to_js(options = {}) ⇒ Object

:nodoc:



2
3
4
# File 'lib/to-javascript/encoders/object.rb', line 2

def to_js(options = {}) #:nodoc:
  ActiveSupport::JS::Code.new ActiveSupport::JS.encode(instance_values, options)
end