press 0.9 → 0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/press.rb +9 -9
- metadata +1 -1
data/lib/press.rb
CHANGED
@@ -21,19 +21,19 @@ module Press
|
|
21
21
|
def pdfme(file, m, e, *data)
|
22
22
|
Printer.pdfme file, m, e, *data
|
23
23
|
end
|
24
|
-
end
|
25
24
|
|
26
|
-
class
|
25
|
+
class Logger
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
def self.level(*attrs)
|
28
|
+
attrs.each do |attr|
|
29
|
+
class_eval "def #{attr} args; Printer.pd type: @type, level: '#{attr}', message: args end", __FILE__, __LINE__
|
30
|
+
end
|
31
31
|
end
|
32
|
-
end
|
33
32
|
|
34
|
-
|
33
|
+
level :debug, :info, :warn, :error, :fatal
|
35
34
|
|
36
|
-
|
37
|
-
|
35
|
+
def initialize(type)
|
36
|
+
@type = type
|
37
|
+
end
|
38
38
|
end
|
39
39
|
end
|