Sha256: 1cf9c1328629caf5d324a3c779dab481f8d429281a7ef8b48ae8cd78b07df545

Contents?: true

Size: 516 Bytes

Versions: 13

Compression:

Stored size: 516 Bytes

Contents

class Rack::Tracker::Handler
  class_attribute :position
  self.position = :head

  attr_accessor :options
  attr_accessor :env

  def initialize(env, options = {})
    self.env = env
    self.options = options
  end

  def events
    env.fetch('tracker', {})[self.class.to_s.demodulize.underscore] || []
  end

  def render
    raise NotImplementedError.new('needs implementation')
  end

  def self.track(name, event)
    raise NotImplementedError.new("class method `#{__callee__}` is not implemented.")
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rack-tracker-0.3.0 lib/rack/tracker/handler.rb
rack-tracker-0.2.6 lib/rack/tracker/handler.rb
rack-tracker-0.2.5 lib/rack/tracker/handler.rb
rack-tracker-0.2.4 lib/rack/tracker/handler.rb
rack-tracker-0.2.3 lib/rack/tracker/handler.rb
rack-tracker-0.2.2 lib/rack/tracker/handler.rb
rack-tracker-0.2.1 lib/rack/tracker/handler.rb
rack-tracker-0.2.0 lib/rack/tracker/handler.rb
rack-tracker-0.1.3 lib/rack/tracker/handler.rb
rack-tracker-0.1.1 lib/rack/tracker/handler.rb
rack-tracker-0.1.0 lib/rack/tracker/handler.rb
rack-tracker-0.0.4 lib/rack/tracker/handler.rb
rack-tracker-0.0.3 lib/rack/tracker/handler.rb