Module: Garb
- Extended by:
- Garb
- Included in:
- Garb
- Defined in:
- lib/garb.rb,
lib/garb/report.rb,
lib/garb/account.rb,
lib/garb/profile.rb,
lib/garb/session.rb,
lib/garb/version.rb,
lib/garb/resource.rb,
lib/garb/data_request.rb,
lib/garb/profile_reports.rb,
lib/garb/report_response.rb,
lib/garb/report_parameter.rb,
lib/garb/filter_parameters.rb,
lib/garb/authentication_request.rb
Defined Under Namespace
Modules: ProfileReports, Resource, Version
Classes: Account, AuthenticationRequest, DataRequest, FilterParameters, Profile, Report, ReportParameter, ReportResponse, Session
Constant Summary
collapse
- GA =
"http://schemas.google.com/analytics/2008"
Instance Method Summary
collapse
Instance Method Details
#from_google_analytics(thing) ⇒ Object
Also known as:
from_ga
38
39
40
|
# File 'lib/garb.rb', line 38
def from_google_analytics(thing)
thing.to_s.gsub(/^ga\:/, '').underscore
end
|
#to_google_analytics(thing) ⇒ Object
Also known as:
to_ga
31
32
33
34
35
|
# File 'lib/garb.rb', line 31
def to_google_analytics(thing)
return thing.to_google_analytics if thing.respond_to?(:to_google_analytics)
"ga:#{thing.to_s.camelize(:lower)}"
end
|