Browse files

Merge branch 'master' of github.com:adelevie/parse-ruby-client

  • Loading branch information...
2 parents 67bf2a4 + 5296496 commit 4846bbda4ffd6ff0873c9b8dd55a211dbc7a6a2d @adelevie committed Jan 24, 2013
Showing with 16 additions and 0 deletions.
  1. +8 −0 lib/parse/datatypes.rb
  2. +8 −0 lib/parse/object.rb
View
8 lib/parse/datatypes.rb
@@ -48,6 +48,10 @@ def to_json(*a)
def get
Parse.get @class_name, @parse_object_id if @parse_object_id
end
+
+ def to_s
+ "#{@class_name}:#{@parse_object_id}"
+ end
end
# Date
@@ -294,6 +298,10 @@ def as_json(*a)
def to_json(*a)
as_json.to_json(*a)
end
+
+ def to_s
+ "(#{latitude}, #{longitude})"
+ end
end
# File
View
8 lib/parse/object.rb
@@ -133,6 +133,14 @@ def to_json(*a)
as_json.to_json(*a)
end
+ def to_s
+ "#{@class_name}:#{@parse_object_id} #{super}"
+ end
+
+ def inspect
+ "#{@class_name}:#{@parse_object_id} #{super}"
+ end
+
# Update the fields of the local Parse object with the current
# values from the API.
def refresh

0 comments on commit 4846bbd

Please sign in to comment.