Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use autoload instead of require #90

Merged
merged 1 commit into from

2 participants

@jamescook

No description provided.

@tpitale tpitale merged commit 000547d into Fosome:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 18, 2011
  1. Use autoload instead of require

    James Cook authored
This page is out of date. Refresh to see the latest.
Showing with 27 additions and 20 deletions.
  1. +27 −20 lib/garb.rb
View
47 lib/garb.rb
@@ -12,30 +12,37 @@
require 'active_support'
end
-require 'garb/version'
-require 'garb/request/authentication'
-require 'garb/request/data'
+module Garb
+ autoload :Destination, 'garb/destination'
+ autoload :FilterParameters, 'garb/filter_parameters'
+ autoload :Model, 'garb/model'
+ autoload :ProfileReports, 'garb/profile_reports'
+ autoload :ReportParameter, 'garb/report_parameter'
+ autoload :ReportResponse, 'garb/report_response'
+ autoload :ResultSet, 'garb/result_set'
+ autoload :Session, 'garb/session'
+ autoload :Step, 'garb/step'
+ autoload :Version, 'garb/version'
+
+ module Management
+ autoload :Account, 'garb/management/account'
+ autoload :Feed, 'garb/management/feed'
+ autoload :Goal, 'garb/management/goal'
+ autoload :Profile, 'garb/management/profile'
+ autoload :Segment, 'garb/management/segment'
+ autoload :WebProperty, 'garb/management/web_property'
+ end
+
+ module Request
+ autoload :Authentication, "garb/request/authentication"
+ autoload :Data, 'garb/request/data'
+ end
+end
+
# require 'garb/account_feed_request'
-require 'garb/session'
-require 'garb/profile_reports'
-require 'garb/step'
-require 'garb/destination'
-require 'garb/filter_parameters'
-require 'garb/report_parameter'
-require 'garb/result_set'
-require 'garb/report_response'
# require 'garb/resource'
# require 'garb/report'
-require 'garb/model'
-
-# management
-require 'garb/management/feed'
-require 'garb/management/segment'
-require 'garb/management/account'
-require 'garb/management/web_property'
-require 'garb/management/profile'
-require 'garb/management/goal'
require 'support'
Something went wrong with that request. Please try again.