Permalink
Browse files

Dryed up by placing load method in Base.

  • Loading branch information...
1 parent 8956a81 commit e66eed7aabf1e4e12684e0d16a7311212eff7b43 @aaronrussell aaronrussell committed Dec 14, 2010
Showing with 10 additions and 18 deletions.
  1. +0 −8 lib/cloudapp/account.rb
  2. +10 −0 lib/cloudapp/base.rb
  3. +0 −10 lib/cloudapp/item.rb
@@ -84,14 +84,6 @@ def reset
self.class.reset :email => self.email
end
- private
-
- def load(attributes = {})
- attributes.each do |key, val|
- self.instance_variable_set("@#{key}", val)
- end
- end
-
end
end
View
@@ -25,6 +25,16 @@ def self.authenticate(username, password)
@@auth = {:username => username, :password => password}
end
+ private
+
+ # Sets the attributes for object.
+ # @param [Hash] attributes
+ def load(attributes = {})
+ attributes.each do |key, val|
+ self.instance_variable_set("@#{key}", val)
+ end
+ end
+
end
end
View
@@ -141,16 +141,6 @@ def update(opts = {})
def delete
self.class.delete self.href
end
-
- private
-
- # Sets the attributes for Item object.
- # @param [Hash] attributes
- def load(attributes = {})
- attributes.each do |key, val|
- self.instance_variable_set("@#{key}", val)
- end
- end
end

0 comments on commit e66eed7

Please sign in to comment.