Class: Object

Inherits:
BasicObject
Defined in:
lib/bowline/ext/object.rb

Instance Method Summary collapse

Instance Method Details

#to_jsObject

Aim is to convert the object in:

* A hash or
* An array of hashes


5
6
7
8
9
10
11
# File 'lib/bowline/ext/object.rb', line 5

def to_js
  if respond_to?(:attributes)
    attributes
  else
    self
  end
end