Class: RailsIdle::Collector::Base

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/rails-idle/collector/base.rb

Direct Known Subclasses

Views

Instance Method Summary collapse

Instance Method Details

#collectObject

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/rails-idle/collector/base.rb', line 8

def collect
  raise NotImplementedError
end

#push(item, execution_time = 1) ⇒ Object



16
17
18
# File 'lib/rails-idle/collector/base.rb', line 16

def push(item, execution_time = 1)
  storage.add(item, execution_time)
end

#storageObject



20
21
22
# File 'lib/rails-idle/collector/base.rb', line 20

def storage
  @starage ||= RailsIdle::Storage::RailsCache.new
end

#subscribeObject

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/rails-idle/collector/base.rb', line 12

def subscribe
  raise NotImplementedError
end