Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
README typo
  • Loading branch information
adelevie committed Nov 8, 2011
1 parent d74a828 commit a84dd0c
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion lib/parse_resource.rb
Expand Up @@ -88,8 +88,37 @@ def create_setters!
end

class << self
def has_one(child_name)
class_eval do

define_method("#{child_name}") do
child_name
end

define_method("#{child_name}=") do |child_object|
[child_object, child_name]
end

end
end

def belongs_to(name)
class_eval do

define_method("#{parent_name}") do
name
end

define_method("#{parent_name}=") do |parent_object|
[parent_name, parent_object]
end

end
end


@@settings ||= nil
-

# Explicitly set Parse.com API keys.
#
# @param [String] app_id the Application ID of your Parse database
Expand Down

0 comments on commit a84dd0c

Please sign in to comment.