ofac 1.3.2 → 2.0.0

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.
@@ -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 OfacMatch - ofac 1.3.1</title>
7
+ <title>class OfacMatch - 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-c-new">::new</a>
76
+ <li ><a href="#method-c-new">::new</a>
74
77
 
75
- <li><a href="#method-i-score">#score</a>
78
+ <li ><a href="#method-i-score">#score</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>
@@ -169,7 +172,9 @@
169
172
  <div class="method-heading">
170
173
  <span class="method-name">new</span><span
171
174
  class="method-args">(stats={})</span>
175
+
172
176
  <span class="method-click-advice">click to toggle source</span>
177
+
173
178
  </div>
174
179
 
175
180
 
@@ -179,19 +184,20 @@
179
184
  Each key in the hash, also has a data hash value for the weight, token, and
180
185
  type.</p>
181
186
 
182
- <pre class="ruby"> <span class="ruby-identifier">match</span> = <span class="ruby-constant">Ofac</span><span class="ruby-operator">::</span><span class="ruby-constant">Match</span>.<span class="ruby-identifier">new</span>({:<span class="ruby-identifier">name</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">weight</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>, :<span class="ruby-identifier">token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Kevin Tyll'</span>},
183
- :<span class="ruby-identifier">city</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">weight</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">40</span>, :<span class="ruby-identifier">token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Clearwater'</span>, },
184
- :<span class="ruby-identifier">address</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">weight</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">40</span>, :<span class="ruby-identifier">token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'1234 Park St.'</span>, },
185
- :<span class="ruby-identifier">zip</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">weight</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>, :<span class="ruby-identifier">token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'33759'</span>, :<span class="ruby-identifier">type</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">number</span>}})
187
+ <pre class="ruby"> <span class="ruby-identifier">match</span> = <span class="ruby-constant">Ofac</span><span class="ruby-operator">::</span><span class="ruby-constant">Match</span>.<span class="ruby-identifier">new</span>({:<span class="ruby-identifier">name</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">weight</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>, :<span class="ruby-identifier">token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;Kevin Tyll&#39;</span>},
188
+ :<span class="ruby-identifier">city</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">weight</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">40</span>, :<span class="ruby-identifier">token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;Clearwater&#39;</span>, },
189
+ :<span class="ruby-identifier">address</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">weight</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">40</span>, :<span class="ruby-identifier">token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;1234 Park St.&#39;</span>, },
190
+ :<span class="ruby-identifier">zip</span> =<span class="ruby-operator">&gt;</span> {:<span class="ruby-identifier">weight</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>, :<span class="ruby-identifier">token</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;33759&#39;</span>, :<span class="ruby-identifier">type</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">number</span>}})
186
191
 
187
192
  <span class="ruby-identifier">data</span> <span class="ruby-identifier">hash</span> <span class="ruby-identifier">keys</span><span class="ruby-operator">:</span>
188
- * <span class="ruby-operator">&lt;</span><span class="ruby-identifier">tt</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">data</span>[:<span class="ruby-identifier">weight</span>]<span class="ruby-operator">&lt;</span><span class="ruby-regexp">%rtt&gt; - value to apply to the score if there is a match (Default is 100/</span><span class="ruby-identifier">umber</span> <span class="ruby-identifier">of</span> <span class="ruby-identifier">keys</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">the</span> <span class="ruby-identifier">record</span> <span class="ruby-identifier">hash</span>)
189
- * <span class="ruby-operator">&lt;</span><span class="ruby-identifier">tt</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">data</span>[:<span class="ruby-identifier">token</span>]<span class="ruby-operator">&lt;</span><span class="ruby-regexp">%rtt&gt; - string to match
193
+ <span class="ruby-operator">*</span> <span class="ruby-operator">&lt;</span><span class="ruby-identifier">tt</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">data</span>[:<span class="ruby-identifier">weight</span>]<span class="ruby-operator">&lt;</span><span class="ruby-regexp">/tt&gt; - value to apply to the score if there is a match (Default is 100/</span><span class="ruby-identifier">umber</span> <span class="ruby-identifier">of</span> <span class="ruby-identifier">keys</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">the</span> <span class="ruby-identifier">record</span> <span class="ruby-identifier">hash</span>)
194
+ <span class="ruby-operator">*</span> <span class="ruby-operator">&lt;</span><span class="ruby-identifier">tt</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">data</span>[:<span class="ruby-identifier">token</span>]<span class="ruby-operator">&lt;</span><span class="ruby-regexp">/tt&gt; - string to match
190
195
  * &lt;tt&gt;data[:match]&lt;/</span><span class="ruby-identifier">tt</span><span class="ruby-operator">&gt;</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">set</span> <span class="ruby-identifier">from</span> <span class="ruby-identifier">records</span> <span class="ruby-identifier">hash</span>
191
- * <span class="ruby-operator">&lt;</span><span class="ruby-identifier">tt</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">data</span>[:<span class="ruby-identifier">score</span>]<span class="ruby-operator">&lt;</span><span class="ruby-regexp">%rtt&gt; - output field
196
+ <span class="ruby-operator">*</span> <span class="ruby-operator">&lt;</span><span class="ruby-identifier">tt</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">data</span>[:<span class="ruby-identifier">score</span>]<span class="ruby-operator">&lt;</span><span class="ruby-regexp">/tt&gt; - output field
192
197
  * &lt;tt&gt;data[:type]&lt;/</span><span class="ruby-identifier">tt</span><span class="ruby-operator">&gt;</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">the</span> <span class="ruby-identifier">type</span> <span class="ruby-identifier">of</span> <span class="ruby-identifier">match</span> <span class="ruby-identifier">that</span> <span class="ruby-identifier">should</span> <span class="ruby-identifier">be</span> <span class="ruby-identifier">performed</span> (<span class="ruby-identifier">valid</span> <span class="ruby-identifier">values</span> <span class="ruby-identifier">are</span> <span class="ruby-operator">+</span>:<span class="ruby-identifier">sound</span><span class="ruby-operator">+</span> <span class="ruby-operator">|</span> <span class="ruby-operator">+</span>:<span class="ruby-identifier">number</span><span class="ruby-operator">+</span>) (<span class="ruby-constant">Default</span> <span class="ruby-identifier">is</span> <span class="ruby-operator">+</span>:<span class="ruby-identifier">sound</span><span class="ruby-operator">+</span>)
193
198
  </pre>
194
199
 
200
+
195
201
 
196
202
 
197
203
  <div class="method-source-code" id="new-source">
@@ -203,7 +209,7 @@ type.</p>
203
209
  <span class="ruby-identifier">weight</span> = <span class="ruby-value">100</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@stats</span>.<span class="ruby-identifier">length</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@stats</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
204
210
  <span class="ruby-ivar">@stats</span>.<span class="ruby-identifier">each_value</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
205
211
  <span class="ruby-identifier">data</span>[<span class="ruby-value">:weight</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">weight</span>
206
- <span class="ruby-identifier">data</span>[<span class="ruby-value">:match</span>] <span class="ruby-operator">||=</span> <span class="ruby-string">''</span>
212
+ <span class="ruby-identifier">data</span>[<span class="ruby-value">:match</span>] <span class="ruby-operator">||=</span> <span class="ruby-string">&#39;&#39;</span>
207
213
  <span class="ruby-identifier">data</span>[<span class="ruby-value">:type</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">:sound</span>
208
214
  <span class="ruby-identifier">data</span>[<span class="ruby-value">:score</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
209
215
  <span class="ruby-identifier">data</span>[<span class="ruby-value">:token</span>] = <span class="ruby-identifier">data</span>[<span class="ruby-value">:token</span>].<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">upcase</span>
@@ -230,7 +236,9 @@ type.</p>
230
236
  <div class="method-heading">
231
237
  <span class="method-name">score</span><span
232
238
  class="method-args">(match_records)</span>
239
+
233
240
  <span class="method-click-advice">click to toggle source</span>
241
+
234
242
  </div>
235
243
 
236
244
 
@@ -243,6 +251,7 @@ type.</p>
243
251
  <p>score will return the highest score of all the records that are sent in
244
252
  match_records.</p>
245
253
 
254
+
246
255
 
247
256
 
248
257
  <div class="method-source-code" id="score-source">
@@ -284,7 +293,7 @@ match_records.</p>
284
293
 
285
294
  <footer id="validator-badges">
286
295
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
287
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
296
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
288
297
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
289
298
  </footer>
290
299
 
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
6
 
7
- <title>module OfacMigration - ofac 1.3.1</title>
7
+ <title>module OfacMigration - 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>
@@ -59,6 +61,7 @@
59
61
 
60
62
 
61
63
 
64
+
62
65
  </div>
63
66
 
64
67
  <div id="project-metadata">
@@ -77,18 +80,18 @@
77
80
 
78
81
  <ul class="link-list">
79
82
 
80
- <li><a href="./OfacMigration.html">OfacMigration</a>
81
-
82
- <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
83
-
84
- <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
85
-
86
83
  <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
87
84
 
88
85
  <li><a href="./Ofac.html">Ofac</a>
89
86
 
90
87
  <li><a href="./OfacMatch.html">OfacMatch</a>
91
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
+
92
95
  <li><a href="./OfacSdn.html">OfacSdn</a>
93
96
 
94
97
  <li><a href="./OfacSdnLoader.html">OfacSdnLoader</a>
@@ -129,7 +132,7 @@
129
132
 
130
133
  <footer id="validator-badges">
131
134
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
132
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
135
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
133
136
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
134
137
  </footer>
135
138
 
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
6
 
7
- <title>module OfacMigration::Generators - ofac 1.3.1</title>
7
+ <title>module OfacMigration::Generators - 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>
@@ -59,6 +61,7 @@
59
61
 
60
62
 
61
63
 
64
+
62
65
  </div>
63
66
 
64
67
  <div id="project-metadata">
@@ -77,18 +80,18 @@
77
80
 
78
81
  <ul class="link-list">
79
82
 
80
- <li><a href="../OfacMigration.html">OfacMigration</a>
81
-
82
- <li><a href="../OfacMigration/Generators.html">OfacMigration::Generators</a>
83
-
84
- <li><a href="../OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
85
-
86
83
  <li><a href="../CreateOfacSdns.html">CreateOfacSdns</a>
87
84
 
88
85
  <li><a href="../Ofac.html">Ofac</a>
89
86
 
90
87
  <li><a href="../OfacMatch.html">OfacMatch</a>
91
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
+
92
95
  <li><a href="../OfacSdn.html">OfacSdn</a>
93
96
 
94
97
  <li><a href="../OfacSdnLoader.html">OfacSdnLoader</a>
@@ -129,7 +132,7 @@
129
132
 
130
133
  <footer id="validator-badges">
131
134
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
132
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
135
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
133
136
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
134
137
  </footer>
135
138
 
@@ -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 OfacMigration::Generators::BuildGenerator - ofac 1.3.1</title>
7
+ <title>class OfacMigration::Generators::BuildGenerator - 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>
@@ -76,15 +78,16 @@
76
78
  </ul>
77
79
  </nav>
78
80
 
81
+
79
82
  <!-- Method Quickref -->
80
83
  <nav id="method-list-section" class="section">
81
84
  <h3 class="section-header">Methods</h3>
82
85
 
83
86
  <ul class="link-list">
84
87
 
85
- <li><a href="#method-c-next_migration_number">::next_migration_number</a>
88
+ <li ><a href="#method-c-next_migration_number">::next_migration_number</a>
86
89
 
87
- <li><a href="#method-i-copy_migrations">#copy_migrations</a>
90
+ <li ><a href="#method-i-copy_migrations">#copy_migrations</a>
88
91
 
89
92
  </ul>
90
93
  </nav>
@@ -107,18 +110,18 @@
107
110
 
108
111
  <ul class="link-list">
109
112
 
110
- <li><a href="../../OfacMigration.html">OfacMigration</a>
111
-
112
- <li><a href="../../OfacMigration/Generators.html">OfacMigration::Generators</a>
113
-
114
- <li><a href="../../OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
115
-
116
113
  <li><a href="../../CreateOfacSdns.html">CreateOfacSdns</a>
117
114
 
118
115
  <li><a href="../../Ofac.html">Ofac</a>
119
116
 
120
117
  <li><a href="../../OfacMatch.html">OfacMatch</a>
121
118
 
119
+ <li><a href="../../OfacMigration.html">OfacMigration</a>
120
+
121
+ <li><a href="../../OfacMigration/Generators.html">OfacMigration::Generators</a>
122
+
123
+ <li><a href="../../OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
124
+
122
125
  <li><a href="../../OfacSdn.html">OfacSdn</a>
123
126
 
124
127
  <li><a href="../../OfacSdnLoader.html">OfacSdnLoader</a>
@@ -161,7 +164,9 @@
161
164
  <div class="method-heading">
162
165
  <span class="method-name">next_migration_number</span><span
163
166
  class="method-args">(path)</span>
167
+
164
168
  <span class="method-click-advice">click to toggle source</span>
169
+
165
170
  </div>
166
171
 
167
172
 
@@ -169,6 +174,7 @@
169
174
 
170
175
  <p>Get the next migration number</p>
171
176
 
177
+
172
178
 
173
179
 
174
180
  <div class="method-source-code" id="next_migration_number-source">
@@ -202,7 +208,9 @@
202
208
  <div class="method-heading">
203
209
  <span class="method-name">copy_migrations</span><span
204
210
  class="method-args">()</span>
211
+
205
212
  <span class="method-click-advice">click to toggle source</span>
213
+
206
214
  </div>
207
215
 
208
216
 
@@ -210,6 +218,7 @@
210
218
 
211
219
  <p>copy the migration file over</p>
212
220
 
221
+
213
222
 
214
223
 
215
224
  <div class="method-source-code" id="copy_migrations-source">
@@ -236,7 +245,7 @@
236
245
 
237
246
  <footer id="validator-badges">
238
247
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
239
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
248
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
240
249
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
241
250
  </footer>
242
251
 
@@ -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 OfacSdn - ofac 1.3.1</title>
7
+ <title>class OfacSdn - 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>
@@ -65,6 +67,17 @@
65
67
 
66
68
 
67
69
 
70
+ <!-- Method Quickref -->
71
+ <nav id="method-list-section" class="section">
72
+ <h3 class="section-header">Methods</h3>
73
+
74
+ <ul class="link-list">
75
+
76
+ <li ><a href="#method-c-possible_sdns">::possible_sdns</a>
77
+
78
+ </ul>
79
+ </nav>
80
+
68
81
  </div>
69
82
 
70
83
  <div id="project-metadata">
@@ -83,18 +96,18 @@
83
96
 
84
97
  <ul class="link-list">
85
98
 
86
- <li><a href="./OfacMigration.html">OfacMigration</a>
87
-
88
- <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
89
-
90
- <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
91
-
92
99
  <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
93
100
 
94
101
  <li><a href="./Ofac.html">Ofac</a>
95
102
 
96
103
  <li><a href="./OfacMatch.html">OfacMatch</a>
97
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
+
98
111
  <li><a href="./OfacSdn.html">OfacSdn</a>
99
112
 
100
113
  <li><a href="./OfacSdnLoader.html">OfacSdnLoader</a>
@@ -128,6 +141,61 @@
128
141
 
129
142
  <!-- Methods -->
130
143
 
144
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
145
+ <h3 class="section-header">Public Class Methods</h3>
146
+
147
+
148
+ <div id="method-c-possible_sdns" class="method-detail ">
149
+
150
+ <div class="method-heading">
151
+ <span class="method-name">possible_sdns</span><span
152
+ class="method-args">(name_array, use_ors = false)</span>
153
+
154
+ <span class="method-click-advice">click to toggle source</span>
155
+
156
+ </div>
157
+
158
+
159
+ <div class="method-description">
160
+
161
+
162
+
163
+
164
+
165
+
166
+ <div class="method-source-code" id="possible_sdns-source">
167
+ <pre><span class="ruby-comment"># File lib/ofac/models/ofac_sdn.rb, line 5</span>
168
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">possible_sdns</span>(<span class="ruby-identifier">name_array</span>, <span class="ruby-identifier">use_ors</span> = <span class="ruby-keyword">false</span>)
169
+ <span class="ruby-identifier">name_conditions</span> = []
170
+ <span class="ruby-identifier">alt_name_conditions</span> = []
171
+ <span class="ruby-identifier">values</span> = []
172
+ <span class="ruby-identifier">name_array</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">partial_name</span><span class="ruby-operator">|</span>
173
+ <span class="ruby-identifier">name_conditions</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39;(lower(name) like ?)&#39;</span>
174
+ <span class="ruby-identifier">alt_name_conditions</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39;(lower(alternate_identity_name) like ?)&#39;</span>
175
+ <span class="ruby-identifier">values</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;%#{partial_name.downcase}%&quot;</span>
176
+ <span class="ruby-keyword">end</span>
177
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">use_ors</span>
178
+ <span class="ruby-identifier">conditions</span> = (<span class="ruby-identifier">name_conditions</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">alt_name_conditions</span>).<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39; or &#39;</span>)
179
+ <span class="ruby-keyword">else</span>
180
+ <span class="ruby-identifier">name_conditions</span> = <span class="ruby-identifier">name_conditions</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39; and &#39;</span>)
181
+ <span class="ruby-identifier">alt_name_conditions</span> = <span class="ruby-identifier">alt_name_conditions</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39; and &#39;</span>)
182
+ <span class="ruby-identifier">conditions</span> = <span class="ruby-node">&quot;(#{name_conditions}) or (#{alt_name_conditions})&quot;</span>
183
+ <span class="ruby-keyword">end</span>
184
+ <span class="ruby-comment"># we need the values in there twice, once for the names and once for the alt_names</span>
185
+ <span class="ruby-constant">OfacSdn</span>.<span class="ruby-identifier">select</span>(<span class="ruby-value">:name</span>, <span class="ruby-value">:alternate_identity_name</span>, <span class="ruby-value">:address</span>, <span class="ruby-value">:city</span>).<span class="ruby-identifier">where</span>(<span class="ruby-identifier">sdn_type</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;individual&#39;</span>).<span class="ruby-identifier">where</span>(<span class="ruby-identifier">conditions</span>, <span class="ruby-operator">*</span>(<span class="ruby-identifier">values</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span>))
186
+ <span class="ruby-keyword">end</span></pre>
187
+ </div><!-- possible_sdns-source -->
188
+
189
+ </div>
190
+
191
+
192
+
193
+
194
+ </div><!-- possible_sdns-method -->
195
+
196
+
197
+ </section><!-- public-class-method-details -->
198
+
131
199
  </section><!-- 5Buntitled-5D -->
132
200
 
133
201
  </div><!-- documentation -->
@@ -135,7 +203,7 @@
135
203
 
136
204
  <footer id="validator-badges">
137
205
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
138
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
206
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
139
207
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
140
208
  </footer>
141
209