name-tamer 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb6ad36c6ae8e6e70a0dc780b7c16a21c044a50e
4
- data.tar.gz: 39e85453fb141d296944dfc2541a19a8308c62d5
3
+ metadata.gz: 868ffa8d0ad91aba79667f22908d94419ad8956d
4
+ data.tar.gz: 240ee3e9b46602e6bd748bbe979bddad49efda57
5
5
  SHA512:
6
- metadata.gz: 50eedb83bbdef219b9ce12309e89faa53f2ca31aad1b20af54068777f7a4792abcca854479409f7259cfa23a376912a558b8c8845a892f7df4807c283a9afd0e
7
- data.tar.gz: cef63c1ce63b49618c49f5f07eaaac89bc81839901581a18662c90cb1f652c72b63463fab27263005da32461db9bc2a0e5ac17dd6986f3b1f7395a623077cac0
6
+ metadata.gz: af12ad0085ae5cb9aef18f6da0f4d5362cabd3a7b0c494eb2e18537fb58a564bc5cb3bd6a62670918a0730729f7d14e70b89b9d37e2d93650e058652aab7c883
7
+ data.tar.gz: 0e995c9d2b33bba198a2523a6deba5045eba31d355e04e939b1f286b88faebcd760c8495e5569fcd9d50e0ee96734cecf2070a6690c67d40df4656d6c9522359
data/README.md CHANGED
@@ -32,7 +32,7 @@ NameTamer['Mr. John Q. Smith III, MD'].simple_name # => John Smith
32
32
  Or you can create an instance if you need several versions of the name
33
33
 
34
34
  ```ruby
35
- name_tamer = NameTamer.new 'Mr. John Q. Smith III, MD'
35
+ name_tamer = NameTamer::Name.new 'Mr. John Q. Smith III, MD'
36
36
  name_tamer.slug # => john-smith
37
37
  name_tamer.simple_name # => John Smith
38
38
  name_tamer.nice_name # => John Q. Smith
@@ -42,7 +42,7 @@ name_tamer.contact_type # => :person
42
42
  NameTamer will make an intelligent guess at the type of the name but it's not infallible. NameTamer likes it if you tell it whether the name is a person or an organization:
43
43
 
44
44
  ```ruby
45
- name_tamer = NameTamer.new 'Di Doo Doo d.o.o.', contact_type: :organization
45
+ name_tamer = NameTamer::Name.new 'Di Doo Doo d.o.o.', contact_type: :organization
46
46
  name_tamer.simple_name # => Di Doo Doo
47
47
  ```
48
48
 
@@ -381,4 +381,10 @@ module NameTamer
381
381
  .upcase_initials!
382
382
  end
383
383
  end
384
+
385
+ # Useful method for iterating through the words in the name
386
+ def each_word(&block)
387
+ @words ||= slug.split(SLUG_DELIMITER)
388
+ @words.each(&block)
389
+ end
384
390
  end
@@ -1,3 +1,3 @@
1
1
  module NameTamer
2
- VERSION = '0.5.1'.freeze
2
+ VERSION = '0.5.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: name-tamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-06 00:00:00.000000000 Z
11
+ date: 2016-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.5.1
192
+ rubygems_version: 2.6.4
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: 'Example: NameTamer[''Mr. John Q. Smith III, MD''].simple_name # => John