wc 0.94.1 → 0.94.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/wc.rb +2 -3
- data/wc.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.94.
|
1
|
+
0.94.2
|
data/lib/wc.rb
CHANGED
@@ -3,17 +3,16 @@ class Wc
|
|
3
3
|
attr_accessor :hide_list
|
4
4
|
|
5
5
|
def initialize(filename, words, hide_list)
|
6
|
+
|
6
7
|
if ! filename.nil?
|
7
8
|
@filename = filename
|
8
|
-
@hide_list = hide_list
|
9
9
|
@occurrences = read
|
10
10
|
else
|
11
11
|
@filename = STDIN
|
12
|
-
@hide_list = hide_list
|
13
12
|
@occurrences = feed
|
14
13
|
end
|
15
14
|
|
16
|
-
|
15
|
+
@hide_list = hide_list
|
17
16
|
@sorted = Array(occurrences).sort { |one, two| -(one[1] <=> two[1]) }
|
18
17
|
@words = words
|
19
18
|
end
|
data/wc.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 355
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 94
|
9
|
-
-
|
10
|
-
version: 0.94.
|
9
|
+
- 2
|
10
|
+
version: 0.94.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Paolo Perego
|