Sha256: b7063e429eebc5c9dc7fb7fb89cc7c00a830f9939df2cc0dfd9ea3ed364da992

Contents?: true

Size: 594 Bytes

Versions: 15

Compression:

Stored size: 594 Bytes

Contents

module TreasureData
module Logger
module Agent::Rails
  module ControllerExtension

    def self.init
      ::ActionController::Base.send(:include, self)
    end

    if defined?(ActiveSupport::Concern)
      extend ActiveSupport::Concern
    else
      # Rails 2
      def self.included(mod)
        im = InstanceMethods
        cm = ClassMethods
        mod.class_eval do
          include im
          extend cm
        end
      end
    end

    module InstanceMethods
      def event
        TreasureData::Logger.event
      end
    end

    module ClassMethods
    end

  end
end
end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
td-logger-0.3.14 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.13 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.12 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.11 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.10 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.9 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.8 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.7 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.6 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.5 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.4 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.3 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.2 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.1 lib/td/logger/agent/rails/controller.rb
td-logger-0.3.0 lib/td/logger/agent/rails/controller.rb