Sha256: 8489b62e2f36725c18e55c06336727b9e6ebd804bda587aa4d853095b4c7de81

Contents?: true

Size: 202 Bytes

Versions: 18

Compression:

Stored size: 202 Bytes

Contents

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

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
maccman-bowline-0.1.1 lib/bowline/ext/object.rb
maccman-bowline-0.1.10 lib/bowline/ext/object.rb
maccman-bowline-0.1.2 lib/bowline/ext/object.rb
maccman-bowline-0.1.3 lib/bowline/ext/object.rb
maccman-bowline-0.1.4 lib/bowline/ext/object.rb
maccman-bowline-0.1.6 lib/bowline/ext/object.rb
maccman-bowline-0.1.7 lib/bowline/ext/object.rb
maccman-bowline-0.1.8 lib/bowline/ext/object.rb
maccman-bowline-0.3.0 lib/bowline/ext/object.rb
maccman-bowline-0.3.1 lib/bowline/ext/object.rb
maccman-bowline-0.3.3 lib/bowline/ext/object.rb
maccman-bowline-0.3.5 lib/bowline/ext/object.rb
maccman-bowline-0.3.6 lib/bowline/ext/object.rb
maccman-bowline-0.3.7 lib/bowline/ext/object.rb
maccman-bowline-0.3.9 lib/bowline/ext/object.rb
maccman-bowline-0.4.0 lib/bowline/ext/object.rb
bowline-0.3.9 lib/bowline/ext/object.rb
bowline-0.1.6 lib/bowline/ext/object.rb