lib/add_this/client.rb in add_this-0.0.1 vs lib/add_this/client.rb in add_this-0.0.2
- old
+ new
@@ -1,9 +1,17 @@
# Client Class
#
# builds a base class for all the api calls
# to inherit from.
+#
+# @example
+# add_this = AddThis::Client.new
+# add_this.shares_url
+#
+# @example
+# AddThis.get.shares_url
+#
require "add_this/requests"
module AddThis
@@ -54,12 +62,14 @@
end
end
class << self
+ # attrs for storing the client object
attr_accessor :client
end
+ # defining the client object so you can make requests on the AddThis class
def self.get
self.client ||= Client.new
end
end