Sha256: 07b521bd522715c5d5e5f9ded8e1bd35bfee59c5f1160d4e47ae772ad83610ca

Contents?: true

Size: 193 Bytes

Versions: 7

Compression:

Stored size: 193 Bytes

Contents

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bowline-0.6.1 lib/bowline/ext/object.rb
bowline-0.6.0 lib/bowline/ext/object.rb
bowline-0.5.8 lib/bowline/ext/object.rb
bowline-0.5.7 lib/bowline/ext/object.rb
bowline-0.5.6 lib/bowline/ext/object.rb
bowline-0.5.5 lib/bowline/ext/object.rb
bowline-0.5.4 lib/bowline/ext/object.rb