ro_thor 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ro_thor.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425c77e970d7129ccfa17265fc0bba55974b649b
|
4
|
+
data.tar.gz: 1478a431fa12c750a65f6a4e36a89d9b68662e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dace08a9a7ec05c5fd05939947d15723d591a729669fb3604d485893a7e49557123e7158ffb7d3ef54dea2f54a7763a47b00ff58cc5d439c4bb73932cf364847
|
7
|
+
data.tar.gz: dd33407e66307225b818d5778a540c77cb7fd27b2a8a980cce4795f5e761399ada18513e2eb671303361d0e64e2cb5ebf26189eb9eb1cec8e769b90e51269311
|
data/lib/ro_thor.rb
CHANGED
@@ -32,6 +32,14 @@ class RoThor < Thor
|
|
32
32
|
File.read(buffer)
|
33
33
|
end
|
34
34
|
|
35
|
+
def grep(str, re, *args, &blk)
|
36
|
+
if test(?f, str)
|
37
|
+
puts read(str).match(re)
|
38
|
+
else
|
39
|
+
puts str.match(re)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
35
43
|
def buffer(*args, &blk)
|
36
44
|
p = "/tmp/ro_thor_buffer"
|
37
45
|
if test(?f, p)
|