Class: Blabbermouth::Bystanders::Rails

Inherits:
Base
  • Object
show all
Includes:
DynamicEvents, Formatter
Defined in:
lib/blabbermouth/rails/bystander.rb

Instance Method Summary collapse

Instance Method Details

#count(key, total, *args) ⇒ Object



19
20
21
# File 'lib/blabbermouth/rails/bystander.rb', line 19

def count(key, total, *args)
  relay :count, key, total, *args
end

#error(key, e, *args) ⇒ Object



7
8
9
# File 'lib/blabbermouth/rails/bystander.rb', line 7

def error(key, e, *args)
  relay :error, key, e, *args
end

#increment(key, by = 1, *args) ⇒ Object



15
16
17
# File 'lib/blabbermouth/rails/bystander.rb', line 15

def increment(key, by=1, *args)
  relay :increment, key, by, *args
end

#info(key, msg = nil, *args) ⇒ Object



11
12
13
# File 'lib/blabbermouth/rails/bystander.rb', line 11

def info(key, msg=nil, *args)
  relay :info, key, msg, *args
end

#relay(meth, key, *args) ⇒ Object



27
28
29
30
# File 'lib/blabbermouth/rails/bystander.rb', line 27

def relay(meth, key, *args)
  data, opts, args = parse_args(*args)
  log meth, key, args.first, data
end

#time(key, duration, *args) ⇒ Object



23
24
25
# File 'lib/blabbermouth/rails/bystander.rb', line 23

def time(key, duration, *args)
  relay :time, key, duration, *args
end