Class: Blabbermouth::Bystanders::Stdout

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

Constant Summary

Constants included from DynamicEvents

DynamicEvents::EXCLUDES

Instance Method Summary collapse

Methods included from DynamicEvents

#method_missing, #respond_to_missing?

Methods included from Formatter

#log_message, #timestamp

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Blabbermouth::Bystanders::DynamicEvents

Instance Method Details

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



19
20
21
# File 'lib/blabbermouth/bystanders/stdout.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/bystanders/stdout.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/bystanders/stdout.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/bystanders/stdout.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/bystanders/stdout.rb', line 27

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

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



23
24
25
# File 'lib/blabbermouth/bystanders/stdout.rb', line 23

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