rubyc 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/rubyc +11 -0
  2. data/lib/rubyc/version.rb +1 -1
  3. metadata +4 -4
data/bin/rubyc CHANGED
@@ -76,6 +76,17 @@ class Rubyc < Thor
76
76
  puts counts
77
77
  end
78
78
 
79
+ desc :grep, "Grep"
80
+ def grep(matcher, code = nil)
81
+ matcher = eval(matcher)
82
+ if code
83
+ proc = eval( "Proc.new{|line| l = line; #{code}}" )
84
+ else
85
+ proc = nil
86
+ end
87
+ puts STDIN.grep(matcher, &proc)
88
+ end
89
+
79
90
  desc :uniq, "uniq"
80
91
  def uniq
81
92
  puts STDIN.to_a.uniq
data/lib/rubyc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rubyc
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Martin Chabot
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-18 00:00:00 -04:00
18
+ date: 2011-05-19 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency