Sha256: a6b58f9326636a4673d3fc9853ce993b713852b9c60121aa19a4b8b8a08aad2b

Contents?: true

Size: 384 Bytes

Versions: 15

Compression:

Stored size: 384 Bytes

Contents

module Garb
  module ProfileReports
    def self.add_report_method(klass)
      # demodulize leaves potential to redefine
      # these methods given different namespaces
      method_name = klass.to_s.demodulize.underscore

      class_eval <<-CODE
        def #{method_name}(opts = {}, &block)
          #{klass}.results(self, opts, &block)
        end
      CODE
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
garb-0.8.2 lib/garb/profile_reports.rb
garb-0.8.1 lib/garb/profile_reports.rb
garb-0.8.0 lib/garb/profile_reports.rb
garb-0.7.6 lib/garb/profile_reports.rb
garb-0.7.5 lib/garb/profile_reports.rb
shingara-garb-0.7.6 lib/garb/profile_reports.rb
garb-no-activesupport-0.7.4 lib/garb/profile_reports.rb
garb-0.7.4 lib/garb/profile_reports.rb
garb-no-activesupport-0.7.3 lib/garb/profile_reports.rb
garb-0.7.3 lib/garb/profile_reports.rb
garb-0.7.2 lib/garb/profile_reports.rb
garb-0.7.1 lib/garb/profile_reports.rb
garb-authsub-0.7.0 lib/garb/profile_reports.rb
garb-0.7.0 lib/garb/profile_reports.rb
garb-0.6.0 lib/garb/profile_reports.rb