Sha256: bb2d525f9a7bfc1087cccb71750437f0bab5ae861d76b8b647b24155b1065a5a

Contents?: true

Size: 191 Bytes

Versions: 12

Compression:

Stored size: 191 Bytes

Contents

class Object
  # Aim is to convert the object in:
  #  * A hash or
  #  * An array of hashes
  def to_js
    if respond_to?(:attributes)
      attributes
    else
      self
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
maccman-bowline-0.4.1 lib/bowline/ext/object.rb
maccman-bowline-0.4.3 lib/bowline/ext/object.rb
maccman-bowline-0.4.4 lib/bowline/ext/object.rb
maccman-bowline-0.4.5 lib/bowline/ext/object.rb
maccman-bowline-0.4.6 lib/bowline/ext/object.rb
maccman-bowline-0.4.7 lib/bowline/ext/object.rb
maccman-bowline-0.4.8 lib/bowline/ext/object.rb
bowline-0.5.3 lib/bowline/ext/object.rb
bowline-0.5.2 lib/bowline/ext/object.rb
bowline-0.5.1 lib/bowline/ext/object.rb
bowline-0.5.0 lib/bowline/ext/object.rb
bowline-0.4.6 lib/bowline/ext/object.rb