aix-errlog 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aix/errlog/errlog.rb +6 -0
- data/lib/aix/errlog/match.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df66d20a3cba9ed0909fd91b997c29d23dc844bb39b3782a950752cb88d5b09
|
4
|
+
data.tar.gz: a72992eaddca7507184812f1f3f3d4498b5b1afba1a25d2d11c51fb5852c7e64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a28e01edd44092ec36d2835020069fba3cec5c692e2b19922f2824d9bc73c6fc044a84a4b5895fb4faeeeda4579871a7cbe9c68709314ac1f9423448b94b2e4
|
7
|
+
data.tar.gz: 3d8a73dab5156b94b46e8d4807a3a3e9dd10ebe26e1996c99b26b97bc8fc37164cee46cdad28ecc202a93124b04b91e073aa27867e580fba938b47a361a10c3f
|
data/lib/aix/errlog/errlog.rb
CHANGED
@@ -220,6 +220,12 @@ module AIX
|
|
220
220
|
# In any case, this function lets you use a block as a shortcut to call a
|
221
221
|
# bunch of public class methods on the Match class, in order to build
|
222
222
|
# complex match expressions, as shown in the summary of this class.
|
223
|
+
#
|
224
|
+
# Warning: Note that the block for this uses a custom self, through
|
225
|
+
# +instance_eval+, so you won't be able to access instance variables
|
226
|
+
# directly. You'll have to put them in through locals. If this isn't a
|
227
|
+
# good enough tradeoff, you can build the Match object directly through
|
228
|
+
# its public methods.
|
223
229
|
def self.match(&block)
|
224
230
|
Match.instance_eval(&block)
|
225
231
|
end
|
data/lib/aix/errlog/match.rb
CHANGED
@@ -69,7 +69,7 @@ module AIX
|
|
69
69
|
when Symbol
|
70
70
|
@struct[:emu1][:emu_field] = @left
|
71
71
|
else
|
72
|
-
raise "left should be either a Match or Symbol object, but is #{@left}"
|
72
|
+
raise "left should be either a Match or Symbol object, but is a #{@left.class}"
|
73
73
|
end
|
74
74
|
|
75
75
|
case @right
|
@@ -82,7 +82,7 @@ module AIX
|
|
82
82
|
when DateTime
|
83
83
|
@struct[:emu2][:emu_intvalue] = @right.to_time.to_i
|
84
84
|
else
|
85
|
-
raise "
|
85
|
+
raise "Right should be either a Match, String, Numeric, Time, or DateTime object, but is a #{@right.class}"
|
86
86
|
end
|
87
87
|
|
88
88
|
@struct
|