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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ro_thor.rb +8 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e171a6126c708d52ac62a6cd53bb721ca725d63
4
- data.tar.gz: 48eed7ba38cec40364673e7ecff197a481299a8d
3
+ metadata.gz: 425c77e970d7129ccfa17265fc0bba55974b649b
4
+ data.tar.gz: 1478a431fa12c750a65f6a4e36a89d9b68662e0d
5
5
  SHA512:
6
- metadata.gz: f4d770a2e977266bf9f5dafdc6fd65dfdcb5e98b40b1c9e3eb0c5c02d2ea17b55dce33dbb1a650320c4ab01cde627e6f799ff6756eaba75db9ca0a9b5fc87e08
7
- data.tar.gz: 113db30f98be375dc9747a710809dbc152b4024dcdf845d9537da498d024d892fd54cec06717d0ecfb2e1eb2d4cfed3f1fb3d514f94febbcd604acae1e220fdc
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ro_thor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''