Permalink
Browse files

Merge remote-tracking branch 'arronmabrey/patch-2'

  • Loading branch information...
calvinfo committed Mar 19, 2013
2 parents 4799e25 + 7678834 commit c022245da71860f891cea2d18c7c83e3e7483360
Showing with 14 additions and 14 deletions.
  1. +14 −14 lib/analytics-ruby.rb
View
@@ -2,23 +2,23 @@
require 'analytics-ruby/client'
module AnalyticsRuby
+ module ClassMethods
+ # By default use a single client for the module
+ def init(options = {})
+ @client = AnalyticsRuby::Client.new(options)
+ end
- # By default use a single client for the module
- def self.init(options = {})
- @client = AnalyticsRuby::Client.new(options)
- end
-
- def self.track(options)
- return false unless @client
- @client.track(options)
- end
+ def track(options)
+ return false unless @client
+ @client.track(options)
+ end
- def self.identify(options)
- return false unless @client
- @client.identify(options)
+ def identify(options)
+ return false unless @client
+ @client.identify(options)
+ end
end
-
-
+ extend ClassMethods
end
# Alias for AnalyticsRuby

0 comments on commit c022245

Please sign in to comment.