ofac 1.3.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
6
 
7
- <title>class OfacSdnLoader - ofac 1.3.1</title>
7
+ <title>class OfacSdnLoader - ofac 2.0.0</title>
8
8
 
9
9
  <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
10
 
@@ -43,6 +43,8 @@
43
43
  </nav>
44
44
 
45
45
 
46
+
47
+
46
48
  <div id="file-metadata">
47
49
  <nav id="file-list-section" class="section">
48
50
  <h3 class="section-header">Defined In</h3>
@@ -64,13 +66,14 @@
64
66
  </nav>
65
67
 
66
68
 
69
+
67
70
  <!-- Method Quickref -->
68
71
  <nav id="method-list-section" class="section">
69
72
  <h3 class="section-header">Methods</h3>
70
73
 
71
74
  <ul class="link-list">
72
75
 
73
- <li><a href="#method-c-load_current_sdn_file">::load_current_sdn_file</a>
76
+ <li ><a href="#method-c-load_current_sdn_file">::load_current_sdn_file</a>
74
77
 
75
78
  </ul>
76
79
  </nav>
@@ -93,18 +96,18 @@
93
96
 
94
97
  <ul class="link-list">
95
98
 
96
- <li><a href="./OfacMigration.html">OfacMigration</a>
97
-
98
- <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
99
-
100
- <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
101
-
102
99
  <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
103
100
 
104
101
  <li><a href="./Ofac.html">Ofac</a>
105
102
 
106
103
  <li><a href="./OfacMatch.html">OfacMatch</a>
107
104
 
105
+ <li><a href="./OfacMigration.html">OfacMigration</a>
106
+
107
+ <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
108
+
109
+ <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
110
+
108
111
  <li><a href="./OfacSdn.html">OfacSdn</a>
109
112
 
110
113
  <li><a href="./OfacSdnLoader.html">OfacSdnLoader</a>
@@ -147,7 +150,9 @@
147
150
  <div class="method-heading">
148
151
  <span class="method-name">load_current_sdn_file</span><span
149
152
  class="method-args">() { |"Downloading OFAC data from http://treas.gov/offices/enforcement/ofac/sdn"| ... }</span>
153
+
150
154
  <span class="method-click-advice">click to toggle source</span>
155
+
151
156
  </div>
152
157
 
153
158
 
@@ -156,19 +161,20 @@
156
161
  <p>Loads the most recent file from <a
157
162
  href="http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/index.shtml">www.treas.gov/offices/enforcement/ofac/sdn/delimit/index.shtml</a></p>
158
163
 
164
+
159
165
 
160
166
 
161
167
  <div class="method-source-code" id="load_current_sdn_file-source">
162
- <pre><span class="ruby-comment"># File lib/ofac/models/ofac_sdn_loader.rb, line 17</span>
168
+ <pre><span class="ruby-comment"># File lib/ofac/models/ofac_sdn_loader.rb, line 18</span>
163
169
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">load_current_sdn_file</span>
164
170
  <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;Reloading OFAC sdn data&quot;</span>
165
171
  <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;Downloading OFAC data from http://www.treas.gov/offices/enforcement/ofac/sdn&quot;</span>
166
172
  <span class="ruby-keyword">yield</span> <span class="ruby-string">&quot;Downloading OFAC data from http://www.treas.gov/offices/enforcement/ofac/sdn&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
167
173
  <span class="ruby-comment">#get the 3 data files</span>
168
- <span class="ruby-identifier">sdn</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'sdn'</span>)
169
- <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">'http://www.treasury.gov/ofac/downloads/sdn.pip'</span>)
174
+ <span class="ruby-identifier">sdn</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;sdn&#39;</span>)
175
+ <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">&#39;http://www.treasury.gov/ofac/downloads/sdn.pip&#39;</span>)
170
176
 
171
- <span class="ruby-identifier">proxy_addr</span>, <span class="ruby-identifier">proxy_port</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-string">'http_proxy'</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;http://&quot;</span>, <span class="ruby-string">&quot;&quot;</span>).<span class="ruby-identifier">split</span>(<span class="ruby-regexp">%r:/</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">'http_proxy'</span>]
177
+ <span class="ruby-identifier">proxy_addr</span>, <span class="ruby-identifier">proxy_port</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;http_proxy&#39;</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&quot;http://&quot;</span>, <span class="ruby-string">&quot;&quot;</span>).<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/:/</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;http_proxy&#39;</span>]
172
178
 
173
179
  <span class="ruby-identifier">bytes</span> = <span class="ruby-identifier">sdn</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Proxy</span>(<span class="ruby-identifier">proxy_addr</span>, <span class="ruby-identifier">proxy_port</span>).<span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>))
174
180
  <span class="ruby-identifier">sdn</span>.<span class="ruby-identifier">rewind</span>
@@ -179,11 +185,11 @@ href="http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/index.shtml">www
179
185
  <span class="ruby-keyword">else</span>
180
186
  <span class="ruby-identifier">sdn</span>.<span class="ruby-identifier">rewind</span>
181
187
  <span class="ruby-keyword">end</span>
182
- <span class="ruby-identifier">address</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'sdn'</span>)
183
- <span class="ruby-identifier">address</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Proxy</span>(<span class="ruby-identifier">proxy_addr</span>, <span class="ruby-identifier">proxy_port</span>).<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">'http://www.treasury.gov/ofac/downloads/add.pip'</span>)))
188
+ <span class="ruby-identifier">address</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;sdn&#39;</span>)
189
+ <span class="ruby-identifier">address</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Proxy</span>(<span class="ruby-identifier">proxy_addr</span>, <span class="ruby-identifier">proxy_port</span>).<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">&#39;http://www.treasury.gov/ofac/downloads/add.pip&#39;</span>)))
184
190
  <span class="ruby-identifier">address</span>.<span class="ruby-identifier">rewind</span>
185
- <span class="ruby-identifier">alt</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'sdn'</span>)
186
- <span class="ruby-identifier">alt</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Proxy</span>(<span class="ruby-identifier">proxy_addr</span>, <span class="ruby-identifier">proxy_port</span>).<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">'http://www.treasury.gov/ofac/downloads/alt.pip'</span>)))
191
+ <span class="ruby-identifier">alt</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;sdn&#39;</span>)
192
+ <span class="ruby-identifier">alt</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Proxy</span>(<span class="ruby-identifier">proxy_addr</span>, <span class="ruby-identifier">proxy_port</span>).<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-string">&#39;http://www.treasury.gov/ofac/downloads/alt.pip&#39;</span>)))
187
193
  <span class="ruby-identifier">alt</span>.<span class="ruby-identifier">rewind</span>
188
194
 
189
195
  <span class="ruby-keyword">if</span> <span class="ruby-constant">OfacSdn</span>.<span class="ruby-identifier">connection</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">ConnectionAdapters</span><span class="ruby-operator">::</span><span class="ruby-constant">AbstractMysqlAdapter</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">OfacSdn</span>.<span class="ruby-identifier">connection</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">ConnectionAdapters</span><span class="ruby-operator">::</span><span class="ruby-constant">JdbcAdapter</span>)
@@ -226,7 +232,7 @@ href="http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/index.shtml">www
226
232
 
227
233
  <footer id="validator-badges">
228
234
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
229
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
235
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
230
236
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
231
237
  </footer>
232
238
 
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
6
 
7
- <title>README - ofac 1.3.1</title>
7
+ <title>README - ofac 2.0.0</title>
8
8
 
9
9
  <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
10
 
@@ -43,6 +43,27 @@
43
43
  </nav>
44
44
 
45
45
 
46
+
47
+ <div id="table-of-contents">
48
+ <nav class="section">
49
+ <h3 class="section-header">Table of Contents</h3>
50
+ <ul>
51
+ <li><a href="#label-ofac">ofac</a>
52
+ <li><a href="#label-DESCRIPTION%3A">DESCRIPTION:</a>
53
+ <li><a href="#label-FEATURES%3A">FEATURES:</a>
54
+ <li><a href="#label-SYNOPSIS%3A">SYNOPSIS:</a>
55
+ <li><a href="#label-REQUIREMENTS%3A">REQUIREMENTS:</a>
56
+ <li><a href="#label-INSTALL%3A">INSTALL:</a>
57
+ <li><a href="#label-Rails+2.0+-+use+version+1.3.2+or+earlier">Rails 2.0 - use version 1.3.2 or earlier</a>
58
+ <li><a href="#label-Rails+3.0+%26+4.0">Rails 3.0 &amp; 4.0</a>
59
+ <li><a href="#label-Add+the+gem+to+your+Gemfile%3A">Add the gem to your Gemfile:</a>
60
+ <li><a href="#label-Run+the+Bundler+install+command">Run the Bundler install command</a>
61
+ <li><a href="#label-Copyright">Copyright</a>
62
+ </ul>
63
+ </nav>
64
+ </div>
65
+
66
+
46
67
  <div id="project-metadata">
47
68
  <nav id="fileindex-section" class="section project-section">
48
69
  <h3 class="section-header">Pages</h3>
@@ -59,18 +80,18 @@
59
80
 
60
81
  <ul class="link-list">
61
82
 
62
- <li><a href="./OfacMigration.html">OfacMigration</a>
63
-
64
- <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
65
-
66
- <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
67
-
68
83
  <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
69
84
 
70
85
  <li><a href="./Ofac.html">Ofac</a>
71
86
 
72
87
  <li><a href="./OfacMatch.html">OfacMatch</a>
73
88
 
89
+ <li><a href="./OfacMigration.html">OfacMigration</a>
90
+
91
+ <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
92
+
93
+ <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
94
+
74
95
  <li><a href="./OfacSdn.html">OfacSdn</a>
75
96
 
76
97
  <li><a href="./OfacSdnLoader.html">OfacSdnLoader</a>
@@ -85,7 +106,7 @@
85
106
 
86
107
  <div id="documentation" class="description">
87
108
 
88
- <h1 id="label-ofac">ofac</h1>
109
+ <h1 id="label-ofac">ofac<span><a href="#label-ofac">&para;</a> <a href="#documentation">&uarr;</a></span></h1>
89
110
  <ul><li>
90
111
  <p><a href="http://kevintyll.github.com/ofac">kevintyll.github.com/ofac</a></p>
91
112
  </li><li>
@@ -95,11 +116,11 @@
95
116
  href="http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml">www.treas.gov/offices/enforcement/ofac/sdn/index.shtml</a></p>
96
117
  </li></ul>
97
118
 
98
- <h2 id="label-DESCRIPTION%3A">DESCRIPTION:</h2>
119
+ <h2 id="label-DESCRIPTION%3A">DESCRIPTION:<span><a href="#label-DESCRIPTION%3A">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
99
120
 
100
- <p>ofac is a ruby gem that tries to find a match of a persons name and
101
- address against the Office of Foreign Assets Controls Specially Designated
102
- Nationals list…the so called terrorist watch list.</p>
121
+ <p>ofac is a ruby gem that tries to find a match of a person&#39;s name and
122
+ address against the Office of Foreign Assets Control&#39;s Specially
123
+ Designated Nationals list…the so called terrorist watch list.</p>
103
124
 
104
125
  <p>This gem, like the ssn_validator gem, started as a need for the company I
105
126
  work for, Clarity Services Inc. We decided once again to create a gem out
@@ -108,11 +129,11 @@ at Clarity Services Inc. for allowing this code to be open sourced. Thanks
108
129
  also to Larry Berland at Clarity Services Inc. The matching logic in the
109
130
  ofac_match.rb file was derived from his work.</p>
110
131
 
111
- <h2 id="label-FEATURES%3A">FEATURES:</h2>
132
+ <h2 id="label-FEATURES%3A">FEATURES:<span><a href="#label-FEATURES%3A">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
112
133
 
113
134
  <p>Creates a score, 1 - 100, based on how well the name, address and city
114
135
  match the data on the SDN list. Since we have to match on strings, the
115
- likely hood of an exact match are virtually nil. So weve created an
136
+ likely hood of an exact match are virtually nil. So we&#39;ve created an
116
137
  algorithm that creates a score. The better the match, the higher the
117
138
  score. A score of 100 would be a perfect match.</p>
118
139
 
@@ -120,14 +141,14 @@ score. A score of 100 would be a perfect match.</p>
120
141
  matched. So if only name is matched, then the max score is the weight for
121
142
  <code>:name</code> which is 60</p>
122
143
 
123
- <p>Its possible to get partial matches, which will add partial weight to the
124
- score. If there is not a match on the element as it is passed in, then
144
+ <p>It&#39;s possible to get partial matches, which will add partial weight to
145
+ the score. If there is not a match on the element as it is passed in, then
125
146
  each word element gets broken down and matches are tried on each partial
126
147
  element. The weighting is distrubuted equally for each partial that is
127
148
  matched.</p>
128
149
 
129
150
  <p>If exact matches are not made, then a sounds like match is attempted. Any
130
- match made by sounds like is given 75% of its weight to the score.
151
+ match made by sounds like is given 75% of it&#39;s weight to the score.
131
152
  Example:</p>
132
153
 
133
154
  <p>If you are trying to match the name Kevin Tyll and there is a record for
@@ -163,13 +184,13 @@ and since Tyll was a sounds like match, it will add 30 * .75. So the
163
184
 
164
185
  <p>If data is in the database for city and or address, and you pass data in
165
186
  for these elements, the score will be reduced by 10% of the weight if there
166
- is no match or sounds like match. So if you get a match on name, you’ve
167
- already got a score of 60. So if you dont pass in an address or city, or
168
- if you do, but there is no city or address info in the database, then your
169
- final score will be 60. But if you do pass in a city, say Tampa, and the
170
- city in the Database is New York, then we will deduct 10% of the weight (30
171
- * .1) = 3 from the score since 30 is the weight for <code>:city</code>. So
172
- the final score will be 57.</p>
187
+ is no match or sounds like match. So if you get a match on name,
188
+ you&#39;ve already got a score of 60. So if you don&#39;t pass in an
189
+ address or city, or if you do, but there is no city or address info in the
190
+ database, then your final score will be 60. But if you do pass in a city,
191
+ say Tampa, and the city in the Database is New York, then we will deduct
192
+ 10% of the weight (30 * .1) = 3 from the score since 30 is the weight for
193
+ <code>:city</code>. So the final score will be 57.</p>
173
194
 
174
195
  <p>If were searching for New York, and the database had New Deli, then there
175
196
  would be a match on New, but not on Deli. Since there were 2 elements in
@@ -188,11 +209,11 @@ to the score if there is first a match on <code>:name</code>.</p>
188
209
 
189
210
  <p>We consider a score of 60 to be reasonable as a hit.</p>
190
211
 
191
- <h2 id="label-SYNOPSIS%3A">SYNOPSIS:</h2>
212
+ <h2 id="label-SYNOPSIS%3A">SYNOPSIS:<span><a href="#label-SYNOPSIS%3A">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
192
213
 
193
- <p>Accepts a hash with the identitys demographic information</p>
214
+ <p>Accepts a hash with the identity&#39;s demographic information</p>
194
215
 
195
- <pre class="ruby"><span class="ruby-constant">Ofac</span>.<span class="ruby-identifier">new</span>({:<span class="ruby-identifier">name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Oscar Hernandez'</span>, :<span class="ruby-identifier">city</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Clearwater'</span>, :<span class="ruby-identifier">address</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'123 somewhere ln'</span>})
216
+ <pre class="ruby"><span class="ruby-constant">Ofac</span>.<span class="ruby-identifier">new</span>({:<span class="ruby-identifier">name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;Oscar Hernandez&#39;</span>, :<span class="ruby-identifier">city</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;Clearwater&#39;</span>, :<span class="ruby-identifier">address</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;123 somewhere ln&#39;</span>})
196
217
  </pre>
197
218
 
198
219
  <p><code>:name</code> is required to get a score. If <code>:name</code> is
@@ -212,9 +233,10 @@ business, or marine vessel</p>
212
233
  </li><li>
213
234
  <p><code>:city</code> (weighting = 30%)</p>
214
235
  </li><li>
215
- <p>Instantiate the object with the identitys name, street address, and city.</p>
236
+ <p>Instantiate the object with the identity&#39;s name, street address, and
237
+ city.</p>
216
238
 
217
- <pre class="ruby"><span class="ruby-identifier">ofac</span> = <span class="ruby-constant">Ofac</span>.<span class="ruby-identifier">new</span>(:<span class="ruby-identifier">name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Kevin Tyll'</span>, :<span class="ruby-identifier">city</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Clearwater'</span>, :<span class="ruby-identifier">address</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'123 Somewhere Ln.'</span>)
239
+ <pre class="ruby"><span class="ruby-identifier">ofac</span> = <span class="ruby-constant">Ofac</span>.<span class="ruby-identifier">new</span>(:<span class="ruby-identifier">name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;Kevin Tyll&#39;</span>, :<span class="ruby-identifier">city</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;Clearwater&#39;</span>, :<span class="ruby-identifier">address</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;123 Somewhere Ln.&#39;</span>)
218
240
  </pre>
219
241
  </li><li>
220
242
  <p>Then get the score</p>
@@ -229,14 +251,14 @@ record.</p>
229
251
  </pre>
230
252
  </li></ul>
231
253
 
232
- <h2 id="label-REQUIREMENTS%3A">REQUIREMENTS:</h2>
254
+ <h2 id="label-REQUIREMENTS%3A">REQUIREMENTS:<span><a href="#label-REQUIREMENTS%3A">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
233
255
  <ul><li>
234
256
  <p>Rails 2.0.0 or greater</p>
235
257
  </li></ul>
236
258
 
237
- <h2 id="label-INSTALL%3A">INSTALL:</h2>
259
+ <h2 id="label-INSTALL%3A">INSTALL:<span><a href="#label-INSTALL%3A">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
238
260
 
239
- <h4 id="label-Rails+2.0">Rails 2.0</h4>
261
+ <h4 id="label-Rails+2.0+-+use+version+1.3.2+or+earlier">Rails 2.0 - use version 1.3.2 or earlier<span><a href="#label-Rails+2.0+-+use+version+1.3.2+or+earlier">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
240
262
  <ul><li>
241
263
  <p>To install the gem:</p>
242
264
 
@@ -249,7 +271,7 @@ record.</p>
249
271
  <p>Require the gem in your environment.rb file in the Rails::Initializer
250
272
  block:</p>
251
273
 
252
- <pre class="ruby"><span class="ruby-identifier">config</span>.<span class="ruby-identifier">gem</span> <span class="ruby-string">'kevintyll-ofac'</span>, :<span class="ruby-identifier">lib</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'ofac'</span>
274
+ <pre class="ruby"><span class="ruby-identifier">config</span>.<span class="ruby-identifier">gem</span> <span class="ruby-string">&#39;kevintyll-ofac&#39;</span>, :<span class="ruby-identifier">lib</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;ofac&#39;</span>
253
275
  </pre>
254
276
  </li><li>
255
277
  <p>To load your table with the current OFAC data, from the command line, run:</p>
@@ -260,7 +282,7 @@ block:</p>
260
282
  http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.</pre>
261
283
  </li></ul>
262
284
 
263
- <h4 id="label-Rails+3.0">Rails 3.0</h4>
285
+ <h4 id="label-Rails+3.0+%26+4.0">Rails 3.0 &amp; 4.0<span><a href="#label-Rails+3.0+%26+4.0">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
264
286
  <ul><li>
265
287
  <p>To create the necessary db migration, from the command line, run:</p>
266
288
 
@@ -269,11 +291,11 @@ block:</p>
269
291
  <p>To add the gem to your Rails project:</p>
270
292
  </li></ul>
271
293
 
272
- <h5 id="label-Add+the+gem+to+your+Gemfile%3A">Add the gem to your Gemfile:</h5>
294
+ <h5 id="label-Add+the+gem+to+your+Gemfile%3A">Add the gem to your Gemfile:<span><a href="#label-Add+the+gem+to+your+Gemfile%3A">&para;</a> <a href="#documentation">&uarr;</a></span></h5>
273
295
 
274
- <pre>gem &quot;ofac&quot;, &quot;~&gt; 1.3.0&quot;</pre>
296
+ <pre>gem &quot;ofac&quot;, &quot;~&gt; 2.0.0&quot;</pre>
275
297
 
276
- <h5 id="label-Run+the+Bundler+install+command">Run the Bundler install command</h5>
298
+ <h5 id="label-Run+the+Bundler+install+command">Run the Bundler install command<span><a href="#label-Run+the+Bundler+install+command">&para;</a> <a href="#documentation">&uarr;</a></span></h5>
277
299
 
278
300
  <pre>bundle install</pre>
279
301
  <ul><li>
@@ -285,9 +307,9 @@ block:</p>
285
307
  http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.</pre>
286
308
  </li></ul>
287
309
 
288
- <h2 id="label-Copyright">Copyright</h2>
310
+ <h2 id="label-Copyright">Copyright<span><a href="#label-Copyright">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
289
311
 
290
- <p>Copyright © 2009 Kevin Tyll. See LICENSE for details.</p>
312
+ <p>Copyright © 2009-2013 Kevin Tyll. See LICENSE for details.</p>
291
313
 
292
314
  </div>
293
315
 
@@ -295,7 +317,7 @@ block:</p>
295
317
 
296
318
  <footer id="validator-badges">
297
319
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
298
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
320
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
299
321
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
300
322
  </footer>
301
323
 
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
6
 
7
- <title>class String - ofac 1.3.1</title>
7
+ <title>class String - ofac 2.0.0</title>
8
8
 
9
9
  <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
10
 
@@ -43,6 +43,8 @@
43
43
  </nav>
44
44
 
45
45
 
46
+
47
+
46
48
  <div id="file-metadata">
47
49
  <nav id="file-list-section" class="section">
48
50
  <h3 class="section-header">Defined In</h3>
@@ -64,15 +66,16 @@
64
66
  </nav>
65
67
 
66
68
 
69
+
67
70
  <!-- Method Quickref -->
68
71
  <nav id="method-list-section" class="section">
69
72
  <h3 class="section-header">Methods</h3>
70
73
 
71
74
  <ul class="link-list">
72
75
 
73
- <li><a href="#method-i-ofac_soundex">#ofac_soundex</a>
76
+ <li ><a href="#method-i-ofac_soundex">#ofac_soundex</a>
74
77
 
75
- <li><a href="#method-i-ofac_sounds_like">#ofac_sounds_like</a>
78
+ <li ><a href="#method-i-ofac_sounds_like">#ofac_sounds_like</a>
76
79
 
77
80
  </ul>
78
81
  </nav>
@@ -95,18 +98,18 @@
95
98
 
96
99
  <ul class="link-list">
97
100
 
98
- <li><a href="./OfacMigration.html">OfacMigration</a>
99
-
100
- <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
101
-
102
- <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
103
-
104
101
  <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
105
102
 
106
103
  <li><a href="./Ofac.html">Ofac</a>
107
104
 
108
105
  <li><a href="./OfacMatch.html">OfacMatch</a>
109
106
 
107
+ <li><a href="./OfacMigration.html">OfacMigration</a>
108
+
109
+ <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
110
+
111
+ <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
112
+
110
113
  <li><a href="./OfacSdn.html">OfacSdn</a>
111
114
 
112
115
  <li><a href="./OfacSdnLoader.html">OfacSdnLoader</a>
@@ -177,7 +180,9 @@
177
180
  <div class="method-heading">
178
181
  <span class="method-name">ofac_soundex</span><span
179
182
  class="method-args">(census = true)</span>
183
+
180
184
  <span class="method-click-advice">click to toggle source</span>
185
+
181
186
  </div>
182
187
 
183
188
 
@@ -186,6 +191,7 @@
186
191
  <p>desc: <a
187
192
  href="http://en.wikipedia.org/wiki/Soundex">en.wikipedia.org/wiki/Soundex</a></p>
188
193
 
194
+
189
195
 
190
196
 
191
197
  <div class="method-source-code" id="ofac_soundex-source">
@@ -196,7 +202,7 @@ href="http://en.wikipedia.org/wiki/Soundex">en.wikipedia.org/wiki/Soundex</a></p
196
202
  <span class="ruby-identifier">str</span>[<span class="ruby-value">0</span> <span class="ruby-operator">..</span> <span class="ruby-value">0</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">str</span>[<span class="ruby-value">1</span> <span class="ruby-operator">..</span> <span class="ruby-value">-1</span>].
197
203
  <span class="ruby-identifier">delete</span>(<span class="ruby-constant">Ofac_SoundexCharsEx</span>).
198
204
  <span class="ruby-identifier">tr</span>(<span class="ruby-constant">Ofac_SoundexChars</span>, <span class="ruby-constant">Ofac_SoundexNums</span>)[<span class="ruby-value">0</span> <span class="ruby-operator">..</span> (<span class="ruby-identifier">census</span> <span class="ruby-operator">?</span> <span class="ruby-value">2</span> <span class="ruby-operator">:</span> <span class="ruby-value">-1</span>)].
199
- <span class="ruby-identifier">ljust</span>(<span class="ruby-value">3</span>, <span class="ruby-string">'0'</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-string">''</span>
205
+ <span class="ruby-identifier">ljust</span>(<span class="ruby-value">3</span>, <span class="ruby-string">&#39;0&#39;</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-string">&#39;&#39;</span>
200
206
  <span class="ruby-keyword">end</span></pre>
201
207
  </div><!-- ofac_soundex-source -->
202
208
 
@@ -213,7 +219,9 @@ href="http://en.wikipedia.org/wiki/Soundex">en.wikipedia.org/wiki/Soundex</a></p
213
219
  <div class="method-heading">
214
220
  <span class="method-name">ofac_sounds_like</span><span
215
221
  class="method-args">(other, census = true)</span>
222
+
216
223
  <span class="method-click-advice">click to toggle source</span>
224
+
217
225
  </div>
218
226
 
219
227
 
@@ -221,6 +229,7 @@ href="http://en.wikipedia.org/wiki/Soundex">en.wikipedia.org/wiki/Soundex</a></p
221
229
 
222
230
 
223
231
 
232
+
224
233
 
225
234
 
226
235
  <div class="method-source-code" id="ofac_sounds_like-source">
@@ -247,7 +256,7 @@ href="http://en.wikipedia.org/wiki/Soundex">en.wikipedia.org/wiki/Soundex</a></p
247
256
 
248
257
  <footer id="validator-badges">
249
258
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
250
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
259
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
251
260
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
252
261
  </footer>
253
262