lib/garb/resource.rb in garb-0.5.1 vs lib/garb/resource.rb in garb-0.6.0

- old
+ new

@@ -1,9 +1,18 @@ module Garb module Resource MONTH = 2592000 URL = "https://www.google.com/analytics/feeds/data" + def self.extended(base) + # define a method on a module that gets included into profile + # Exits would make: + # to enable profile.exits(options_hash, &block) + # returns Exits.results(self, options_hash, &block) + # every class defined which extends Resource will add to the module + ProfileReports.add_report_method(base) + end + %w(metrics dimensions sort).each do |parameter| class_eval <<-CODE def #{parameter}(*fields) @#{parameter} ||= ReportParameter.new(:#{parameter}) @#{parameter} << fields