Module: Hoover
- Defined in:
- lib/hoover.rb,
lib/hoover/job.rb,
lib/hoover/railtie.rb,
lib/hoover/version.rb,
lib/hoover/rack_logger.rb,
lib/hoover/action_controller_methods.rb,
lib/hoover/log_subscribers/action_view_log_subscriber.rb,
lib/hoover/log_subscribers/action_mailer_log_subscriber.rb,
lib/hoover/log_subscribers/active_record_log_subscriber.rb,
lib/hoover/log_subscribers/active_resource_log_subscriber.rb,
lib/hoover/log_subscribers/action_controller_log_subscriber.rb
Defined Under Namespace
Modules: ActionControllerMethods
Classes: ActionControllerLogSubscriber, ActionMailerLogSubscriber, ActionViewLogSubscriber, ActiveRecordLogSubscriber, ActiveResourceLogSubscriber, Job, RackLogger, Railtie
Constant Summary
collapse
- VERSION =
'0.0.6'
Class Method Summary
collapse
Class Method Details
.add(*args) ⇒ Object
29
30
31
32
|
# File 'lib/hoover.rb', line 29
def add(*args)
raise "Must init Hoover before calling add" unless active_job
active_job.add(*args)
end
|
.flush ⇒ Object
44
45
46
47
48
49
|
# File 'lib/hoover.rb', line 44
def flush
raise "Hoover.logglier must be set before calling flush" unless active_job.ready_to_post?
active_job.post
reset!
end
|
.hash(*args) ⇒ Object
34
35
36
37
|
# File 'lib/hoover.rb', line 34
def hash(*args)
raise "Must init Hoover before calling hash" unless active_job
active_job.hash
end
|
.init(logglier = nil) ⇒ Object
13
14
15
|
# File 'lib/hoover.rb', line 13
def init(logglier = nil)
self.active_job = Job.new(logglier)
end
|
.initialized? ⇒ Boolean
17
18
19
|
# File 'lib/hoover.rb', line 17
def initialized?
! active_job.nil?
end
|
.logglier=(logglier) ⇒ Object
39
40
41
42
|
# File 'lib/hoover.rb', line 39
def logglier=(logglier)
raise "Must init Hoover before setting logglier" unless active_job
active_job.logglier = logglier
end
|
.ready_to_post? ⇒ Boolean
21
22
23
|
# File 'lib/hoover.rb', line 21
def ready_to_post?
initialized? && active_job.ready_to_post?
end
|
.reset! ⇒ Object
25
26
27
|
# File 'lib/hoover.rb', line 25
def reset!
self.active_job = nil
end
|