words_counted 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9847725d713bc20dd1b66d86321c8089e33276bf
4
- data.tar.gz: f847a70bf6e008527606f944833979bf952a330e
3
+ metadata.gz: f61a698d9d17731d259b713c3757349b0903423b
4
+ data.tar.gz: fee5634244f3acc3b2b63ec8743dda47b8fae9f4
5
5
  SHA512:
6
- metadata.gz: d5922f2b471ea4bc60650a77972c289e516dae19b5ba4e59ceacf669df85442b775361a43ea9c8765270b005e2a8dfd1db39dbd4b85e29db142a3c064cabaff7
7
- data.tar.gz: 2ab1369a5dc2b063c749242339e93d7a5f5424a9bae489fd6b649406834e7e05f18af7a598c797928f256d73eba532db3e1ebde95cbf5798b58b9e32599a6f8f
6
+ metadata.gz: f8db533544c8c94bb563ea68118b2c46b9b44d05567e0bef9904ecc2cf21655dc10ea2fe98385bd86b5bde6c81343adce6cbf5400f7f94b7daa799c103f20251
7
+ data.tar.gz: a06af98468823d3dd6bb6af1e41939f0ee47a5acc4e8536dbd8a15869fb548d3f4b0cf101ec05ded0c70e68ba9dca3fe62466823e99e089b2dcf5acd28fc22ef
data/README.md CHANGED
@@ -164,7 +164,9 @@ counter.word_density
164
164
  You can pass in a space-delimited word list to filter words that you don't want to count. Filter words should be *lowercase*. The filter will remove both uppercase and lowercase variants of the word.
165
165
 
166
166
  ```ruby
167
- WordsCounted::Counter.new("Magnificent! That was magnificent, Trevor.", filter: "was magnificent")
167
+ WordsCounted::Counter.new(
168
+ "Magnificent! That was magnificent, Trevor.", filter: "was magnificent"
169
+ )
168
170
  counter.words
169
171
  #=> ["That", "Trevor"]
170
172
  ```
@@ -182,7 +184,7 @@ If you prefer, you can pass in your own criteria in the form of a Ruby regexp to
182
184
  ```ruby
183
185
  counter = WordsCounted::Counter.new("I am 007.", regex: /[^\p{Alnum}\-']+/)
184
186
  counter.words
185
- => ["I", "am", "007"]
187
+ #=> ["I", "am", "007"]
186
188
  ```
187
189
 
188
190
  ## Gotchas
@@ -211,7 +213,9 @@ counter.word_occurrences
211
213
 
212
214
  In this example, `-you` and `you` are counted as separate words. Writers should use the correct dash element, but this is not always the case.
213
215
 
214
- The default criteria does not count numbers as words.
216
+ Another gotcha is that the default criteria does not count numbers as words.
217
+
218
+ Remember that you can pass in your own regexp if the default solution does not fit your needs.
215
219
 
216
220
  ## To do
217
221
 
@@ -240,7 +244,7 @@ end
240
244
 
241
245
  #### Isn't it better to write this in JavaScript?
242
246
 
243
- ![http://stream1.gifsoup.com/view3/1290449/picard-facepalm-o.gif][Picard face palm]
247
+ ![Picard face palm](http://stream1.gifsoup.com/view3/1290449/picard-facepalm-o.gif "Picard face palm")
244
248
 
245
249
  ## About
246
250
 
@@ -1,3 +1,3 @@
1
1
  module WordsCounted
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: words_counted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohamad El-Husseini