press 0.8 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/press.rb +15 -0
  2. metadata +2 -2
data/lib/press.rb CHANGED
@@ -22,3 +22,18 @@ module Press
22
22
  Printer.pdfme file, m, e, *data
23
23
  end
24
24
  end
25
+
26
+ class PressLogger
27
+
28
+ def self.level(*attrs)
29
+ attrs.each do |attr|
30
+ class_eval "def #{attr} args; Printer.pd type: @type, level: '#{attr}', message: args end", __FILE__, __LINE__
31
+ end
32
+ end
33
+
34
+ level :debug, :info, :warn, :error, :fatal
35
+
36
+ def initialize(type)
37
+ @type = type
38
+ end
39
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: press
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.8'
4
+ version: '0.9'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-28 00:00:00.000000000 Z
12
+ date: 2012-08-29 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Data and exception printer.
15
15
  email: mark.fine@gmail.com