hash-that-tree 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/.gitignore +1 -1
  2. data/README.md +8 -0
  3. data/hash-that-tree.gemspec +4 -2
  4. data/lib/{hashthattree.rb → compare.rb} +8 -9
  5. data/lib/version.rb +1 -1
  6. metadata +22 -53
  7. data/doc/Gemfile.html +0 -96
  8. data/doc/HashThatTree.html +0 -171
  9. data/doc/HashThatTree/FileHashResults.html +0 -258
  10. data/doc/HashThatTree/MD5Compare.html +0 -386
  11. data/doc/LICENSE_txt.html +0 -114
  12. data/doc/Rakefile.html +0 -94
  13. data/doc/created.rid +0 -6
  14. data/doc/images/brick.png +0 -0
  15. data/doc/images/brick_link.png +0 -0
  16. data/doc/images/bug.png +0 -0
  17. data/doc/images/bullet_black.png +0 -0
  18. data/doc/images/bullet_toggle_minus.png +0 -0
  19. data/doc/images/bullet_toggle_plus.png +0 -0
  20. data/doc/images/date.png +0 -0
  21. data/doc/images/find.png +0 -0
  22. data/doc/images/loadingAnimation.gif +0 -0
  23. data/doc/images/macFFBgHack.png +0 -0
  24. data/doc/images/package.png +0 -0
  25. data/doc/images/page_green.png +0 -0
  26. data/doc/images/page_white_text.png +0 -0
  27. data/doc/images/page_white_width.png +0 -0
  28. data/doc/images/plugin.png +0 -0
  29. data/doc/images/ruby.png +0 -0
  30. data/doc/images/tag_green.png +0 -0
  31. data/doc/images/wrench.png +0 -0
  32. data/doc/images/wrench_orange.png +0 -0
  33. data/doc/images/zoom.png +0 -0
  34. data/doc/index.html +0 -74
  35. data/doc/js/darkfish.js +0 -116
  36. data/doc/js/jquery.js +0 -32
  37. data/doc/js/quicksearch.js +0 -114
  38. data/doc/js/thickbox-compressed.js +0 -10
  39. data/doc/lib/hashthattree_rb.html +0 -54
  40. data/doc/lib/version_rb.html +0 -52
  41. data/doc/rdoc.css +0 -763
  42. data/doc/spec/file3_txt~.html +0 -118
  43. data/doc/spec/file4_txt~.html +0 -118
  44. data/doc/spec/testfiles/1/file1_txt.html +0 -112
  45. data/doc/spec/testfiles/1/file2_txt.html +0 -112
  46. data/doc/spec/testfiles/1/file3_txt.html +0 -114
  47. data/doc/spec/testfiles/1/file4_txt.html +0 -114
  48. data/doc/spec/testfiles/2/file1_txt.html +0 -112
  49. data/doc/spec/testfiles/2/file2_txt.html +0 -112
  50. data/doc/spec/testfiles/2/file3_txt.html +0 -114
  51. data/doc/spec/testfiles/2/file4_txt.html +0 -114
  52. data/doc/spec/testfiles/2/fileA_txt.html +0 -112
  53. data/doc/spec/testfiles/2/fileB_txt.html +0 -112
@@ -1,258 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: HashThatTree::FileHashResults</title>
9
-
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
- <script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
- <script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
-
17
- </head>
18
- <body id="top" class="class">
19
-
20
- <div id="metadata">
21
- <div id="home-metadata">
22
- <div id="home-section" class="section">
23
- <h3 class="section-header">
24
- <a href="../index.html">Home</a>
25
- <a href="../index.html#classes">Classes</a>
26
- <a href="../index.html#methods">Methods</a>
27
- </h3>
28
- </div>
29
- </div>
30
-
31
- <div id="file-metadata">
32
- <div id="file-list-section" class="section">
33
- <h3 class="section-header">In Files</h3>
34
- <div class="section-body">
35
- <ul>
36
-
37
- <li><a href="../lib/hashthattree_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
- class="thickbox" title="lib/hashthattree.rb">lib/hashthattree.rb</a></li>
39
-
40
- </ul>
41
- </div>
42
- </div>
43
-
44
-
45
- </div>
46
-
47
- <div id="class-metadata">
48
-
49
- <!-- Parent Class -->
50
- <div id="parent-class-section" class="section">
51
- <h3 class="section-header">Parent</h3>
52
-
53
- <p class="link">Object</p>
54
-
55
- </div>
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
- <!-- Method Quickref -->
64
- <div id="method-list-section" class="section">
65
- <h3 class="section-header">Methods</h3>
66
- <ul class="link-list">
67
-
68
- <li><a href="#method-c-new">::new</a></li>
69
-
70
- </ul>
71
- </div>
72
-
73
-
74
-
75
- </div>
76
-
77
- <div id="project-metadata">
78
-
79
-
80
- <div id="fileindex-section" class="section project-section">
81
- <h3 class="section-header">Files</h3>
82
- <ul>
83
-
84
- <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
85
-
86
- <li class="file"><a href="../LICENSE_txt.html">LICENSE.txt</a></li>
87
-
88
- <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
89
-
90
- </ul>
91
- </div>
92
-
93
-
94
- <div id="classindex-section" class="section project-section">
95
- <h3 class="section-header">Class/Module Index
96
- <span class="search-toggle"><img src="../images/find.png"
97
- height="16" width="16" alt="[+]"
98
- title="show/hide quicksearch" /></span></h3>
99
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
100
- <fieldset>
101
- <legend>Quicksearch</legend>
102
- <input type="text" name="quicksearch" value=""
103
- class="quicksearch-field" />
104
- </fieldset>
105
- </form>
106
-
107
- <ul class="link-list">
108
-
109
- <li><a href="../HashThatTree.html">HashThatTree</a></li>
110
-
111
- <li><a href="../HashThatTree/FileHashResults.html">HashThatTree::FileHashResults</a></li>
112
-
113
- <li><a href="../HashThatTree/MD5Compare.html">HashThatTree::MD5Compare</a></li>
114
-
115
- </ul>
116
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
117
- </div>
118
-
119
-
120
- </div>
121
- </div>
122
-
123
- <div id="documentation">
124
- <h1 class="class">HashThatTree::FileHashResults</h1>
125
-
126
- <div id="description" class="description">
127
-
128
- <p>Container for the results of the file comparisson</p>
129
-
130
- </div><!-- description -->
131
-
132
-
133
-
134
-
135
- <div id="5Buntitled-5D" class="documentation-section">
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
- <!-- Attributes -->
144
- <div id="attribute-method-details" class="method-section section">
145
- <h3 class="section-header">Attributes</h3>
146
-
147
-
148
- <div id="file_hash1-attribute-method" class="method-detail">
149
- <a name="file_hash1"></a>
150
-
151
- <a name="file_hash1="></a>
152
-
153
- <div class="method-heading attribute-method-heading">
154
- <span class="method-name">file_hash1</span><span
155
- class="attribute-access-type">[RW]</span>
156
- </div>
157
-
158
- <div class="method-description">
159
-
160
-
161
-
162
- </div>
163
- </div>
164
-
165
- <div id="file_hash2-attribute-method" class="method-detail">
166
- <a name="file_hash2"></a>
167
-
168
- <a name="file_hash2="></a>
169
-
170
- <div class="method-heading attribute-method-heading">
171
- <span class="method-name">file_hash2</span><span
172
- class="attribute-access-type">[RW]</span>
173
- </div>
174
-
175
- <div class="method-description">
176
-
177
-
178
-
179
- </div>
180
- </div>
181
-
182
- <div id="file_name-attribute-method" class="method-detail">
183
- <a name="file_name"></a>
184
-
185
- <a name="file_name="></a>
186
-
187
- <div class="method-heading attribute-method-heading">
188
- <span class="method-name">file_name</span><span
189
- class="attribute-access-type">[RW]</span>
190
- </div>
191
-
192
- <div class="method-description">
193
-
194
-
195
-
196
- </div>
197
- </div>
198
-
199
- </div><!-- attribute-method-details -->
200
-
201
-
202
- <!-- Methods -->
203
-
204
- <div id="public-class-method-details" class="method-section section">
205
- <h3 class="section-header">Public Class Methods</h3>
206
-
207
-
208
- <div id="new-method" class="method-detail ">
209
- <a name="method-c-new"></a>
210
-
211
-
212
- <div class="method-heading">
213
- <span class="method-name">new</span><span
214
- class="method-args">(file_name, file_hash1, file_hash2)</span>
215
- <span class="method-click-advice">click to toggle source</span>
216
- </div>
217
-
218
-
219
- <div class="method-description">
220
-
221
-
222
-
223
-
224
-
225
- <div class="method-source-code" id="new-source">
226
- <pre>
227
- <span class="ruby-comment"># File lib/hashthattree.rb, line 75</span>
228
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">file_name</span>, <span class="ruby-identifier">file_hash1</span>, <span class="ruby-identifier">file_hash2</span>)
229
- <span class="ruby-ivar">@file_name</span> = <span class="ruby-identifier">file_name</span>
230
- <span class="ruby-ivar">@file_hash1</span> = <span class="ruby-identifier">file_hash1</span>
231
- <span class="ruby-ivar">@file_hash2</span> = <span class="ruby-identifier">file_hash2</span>
232
- <span class="ruby-keyword">end</span></pre>
233
- </div><!-- new-source -->
234
-
235
- </div>
236
-
237
-
238
-
239
-
240
- </div><!-- new-method -->
241
-
242
-
243
- </div><!-- public-class-method-details -->
244
-
245
- </div><!-- 5Buntitled-5D -->
246
-
247
-
248
- </div><!-- documentation -->
249
-
250
- <div id="validator-badges">
251
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
252
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
253
- Rdoc Generator</a> 2</small>.</p>
254
- </div>
255
-
256
- </body>
257
- </html>
258
-
@@ -1,386 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: HashThatTree::MD5Compare</title>
9
-
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
- <script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
- <script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
-
17
- </head>
18
- <body id="top" class="class">
19
-
20
- <div id="metadata">
21
- <div id="home-metadata">
22
- <div id="home-section" class="section">
23
- <h3 class="section-header">
24
- <a href="../index.html">Home</a>
25
- <a href="../index.html#classes">Classes</a>
26
- <a href="../index.html#methods">Methods</a>
27
- </h3>
28
- </div>
29
- </div>
30
-
31
- <div id="file-metadata">
32
- <div id="file-list-section" class="section">
33
- <h3 class="section-header">In Files</h3>
34
- <div class="section-body">
35
- <ul>
36
-
37
- <li><a href="../lib/hashthattree_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
- class="thickbox" title="lib/hashthattree.rb">lib/hashthattree.rb</a></li>
39
-
40
- </ul>
41
- </div>
42
- </div>
43
-
44
-
45
- </div>
46
-
47
- <div id="class-metadata">
48
-
49
- <!-- Parent Class -->
50
- <div id="parent-class-section" class="section">
51
- <h3 class="section-header">Parent</h3>
52
-
53
- <p class="link">Object</p>
54
-
55
- </div>
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
- <!-- Method Quickref -->
64
- <div id="method-list-section" class="section">
65
- <h3 class="section-header">Methods</h3>
66
- <ul class="link-list">
67
-
68
- <li><a href="#method-c-new">::new</a></li>
69
-
70
- <li><a href="#method-i-compare">#compare</a></li>
71
-
72
- <li><a href="#method-i-display_results">#display_results</a></li>
73
-
74
- <li><a href="#method-i-validate">#validate</a></li>
75
-
76
- </ul>
77
- </div>
78
-
79
-
80
-
81
- </div>
82
-
83
- <div id="project-metadata">
84
-
85
-
86
- <div id="fileindex-section" class="section project-section">
87
- <h3 class="section-header">Files</h3>
88
- <ul>
89
-
90
- <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
91
-
92
- <li class="file"><a href="../LICENSE_txt.html">LICENSE.txt</a></li>
93
-
94
- <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
95
-
96
- </ul>
97
- </div>
98
-
99
-
100
- <div id="classindex-section" class="section project-section">
101
- <h3 class="section-header">Class/Module Index
102
- <span class="search-toggle"><img src="../images/find.png"
103
- height="16" width="16" alt="[+]"
104
- title="show/hide quicksearch" /></span></h3>
105
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
106
- <fieldset>
107
- <legend>Quicksearch</legend>
108
- <input type="text" name="quicksearch" value=""
109
- class="quicksearch-field" />
110
- </fieldset>
111
- </form>
112
-
113
- <ul class="link-list">
114
-
115
- <li><a href="../HashThatTree.html">HashThatTree</a></li>
116
-
117
- <li><a href="../HashThatTree/FileHashResults.html">HashThatTree::FileHashResults</a></li>
118
-
119
- <li><a href="../HashThatTree/MD5Compare.html">HashThatTree::MD5Compare</a></li>
120
-
121
- </ul>
122
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
123
- </div>
124
-
125
-
126
- </div>
127
- </div>
128
-
129
- <div id="documentation">
130
- <h1 class="class">HashThatTree::MD5Compare</h1>
131
-
132
- <div id="description" class="description">
133
-
134
- <p>This class accepts two folders and provides methods to iterate through them
135
- creating a hash of each file within and can display the results for
136
- analysis</p>
137
-
138
- </div><!-- description -->
139
-
140
-
141
-
142
-
143
- <div id="5Buntitled-5D" class="documentation-section">
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
- <!-- Attributes -->
152
- <div id="attribute-method-details" class="method-section section">
153
- <h3 class="section-header">Attributes</h3>
154
-
155
-
156
- <div id="folder1-attribute-method" class="method-detail">
157
- <a name="folder1"></a>
158
-
159
- <a name="folder1="></a>
160
-
161
- <div class="method-heading attribute-method-heading">
162
- <span class="method-name">folder1</span><span
163
- class="attribute-access-type">[RW]</span>
164
- </div>
165
-
166
- <div class="method-description">
167
-
168
-
169
-
170
- </div>
171
- </div>
172
-
173
- <div id="folder2-attribute-method" class="method-detail">
174
- <a name="folder2"></a>
175
-
176
- <a name="folder2="></a>
177
-
178
- <div class="method-heading attribute-method-heading">
179
- <span class="method-name">folder2</span><span
180
- class="attribute-access-type">[RW]</span>
181
- </div>
182
-
183
- <div class="method-description">
184
-
185
-
186
-
187
- </div>
188
- </div>
189
-
190
- </div><!-- attribute-method-details -->
191
-
192
-
193
- <!-- Methods -->
194
-
195
- <div id="public-class-method-details" class="method-section section">
196
- <h3 class="section-header">Public Class Methods</h3>
197
-
198
-
199
- <div id="new-method" class="method-detail ">
200
- <a name="method-c-new"></a>
201
-
202
-
203
- <div class="method-heading">
204
- <span class="method-name">new</span><span
205
- class="method-args">(folder1, folder2)</span>
206
- <span class="method-click-advice">click to toggle source</span>
207
- </div>
208
-
209
-
210
- <div class="method-description">
211
-
212
- <p>initialize the class with the folders to be compared</p>
213
-
214
-
215
-
216
- <div class="method-source-code" id="new-source">
217
- <pre>
218
- <span class="ruby-comment"># File lib/hashthattree.rb, line 20</span>
219
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">folder1</span>, <span class="ruby-identifier">folder2</span>)
220
- <span class="ruby-ivar">@folder1</span> = <span class="ruby-identifier">folder1</span>
221
- <span class="ruby-ivar">@folder2</span> = <span class="ruby-identifier">folder2</span>
222
- <span class="ruby-ivar">@filehash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
223
- <span class="ruby-identifier">validate</span>
224
- <span class="ruby-keyword">end</span></pre>
225
- </div><!-- new-source -->
226
-
227
- </div>
228
-
229
-
230
-
231
-
232
- </div><!-- new-method -->
233
-
234
-
235
- </div><!-- public-class-method-details -->
236
-
237
- <div id="public-instance-method-details" class="method-section section">
238
- <h3 class="section-header">Public Instance Methods</h3>
239
-
240
-
241
- <div id="compare-method" class="method-detail ">
242
- <a name="method-i-compare"></a>
243
-
244
-
245
- <div class="method-heading">
246
- <span class="method-name">compare</span><span
247
- class="method-args">()</span>
248
- <span class="method-click-advice">click to toggle source</span>
249
- </div>
250
-
251
-
252
- <div class="method-description">
253
-
254
- <p>Iterates through the folders and creates a <a
255
- href="FileHashResults.html">FileHashResults</a> object containing the
256
- results of the comparisson</p>
257
-
258
-
259
-
260
- <div class="method-source-code" id="compare-source">
261
- <pre>
262
- <span class="ruby-comment"># File lib/hashthattree.rb, line 43</span>
263
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">compare</span>
264
-
265
- <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-ivar">@folder1</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
266
- <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span> <span class="ruby-operator">==</span> <span class="ruby-string">'.'</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">item</span> <span class="ruby-operator">==</span> <span class="ruby-string">'..'</span>
267
- <span class="ruby-identifier">the_hash</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@folder1</span>, <span class="ruby-identifier">item</span>)))
268
- <span class="ruby-identifier">filedata</span> = <span class="ruby-constant">FileHashResults</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">item</span>, <span class="ruby-identifier">the_hash</span>, <span class="ruby-keyword">nil</span>)
269
- <span class="ruby-ivar">@filehash</span>[<span class="ruby-identifier">item</span>] = <span class="ruby-identifier">filedata</span>
270
- <span class="ruby-keyword">end</span>
271
-
272
- <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-ivar">@folder2</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
273
- <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">item</span> <span class="ruby-operator">==</span> <span class="ruby-string">'.'</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">item</span> <span class="ruby-operator">==</span> <span class="ruby-string">'..'</span>
274
- <span class="ruby-identifier">the_hash</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@folder2</span>, <span class="ruby-identifier">item</span>)))
275
- <span class="ruby-keyword">if</span>(<span class="ruby-ivar">@filehash</span>[<span class="ruby-identifier">item</span>]<span class="ruby-operator">==</span><span class="ruby-keyword">nil</span>)
276
- <span class="ruby-identifier">filedata</span> = <span class="ruby-constant">FileHashResults</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">item</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">the_hash</span>)
277
- <span class="ruby-ivar">@filehash</span>[<span class="ruby-identifier">item</span>] = <span class="ruby-identifier">filedata</span>
278
- <span class="ruby-keyword">next</span>
279
- <span class="ruby-keyword">end</span>
280
- <span class="ruby-ivar">@filehash</span>[<span class="ruby-identifier">item</span>].<span class="ruby-identifier">file_hash2</span> = <span class="ruby-identifier">the_hash</span>
281
- <span class="ruby-keyword">end</span>
282
- <span class="ruby-keyword">end</span></pre>
283
- </div><!-- compare-source -->
284
-
285
- </div>
286
-
287
-
288
-
289
-
290
- </div><!-- compare-method -->
291
-
292
-
293
- <div id="display_results-method" class="method-detail ">
294
- <a name="method-i-display_results"></a>
295
-
296
-
297
- <div class="method-heading">
298
- <span class="method-name">display_results</span><span
299
- class="method-args">()</span>
300
- <span class="method-click-advice">click to toggle source</span>
301
- </div>
302
-
303
-
304
- <div class="method-description">
305
-
306
- <p>Dumps the contents of the <a
307
- href="FileHashResults.html">FileHashResults</a> object in csv form to
308
- standard out</p>
309
-
310
-
311
-
312
- <div class="method-source-code" id="display_results-source">
313
- <pre>
314
- <span class="ruby-comment"># File lib/hashthattree.rb, line 65</span>
315
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">display_results</span>
316
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;FileName,#{@folder1},#{@folder2},Are Equal&quot;</span>
317
- <span class="ruby-ivar">@filehash</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{value.file_name},#{value.file_hash1},#{value.file_hash2}, #{value.file_hash1==value.file_hash2}&quot;</span> }
318
- <span class="ruby-keyword">end</span></pre>
319
- </div><!-- display_results-source -->
320
-
321
- </div>
322
-
323
-
324
-
325
-
326
- </div><!-- display_results-method -->
327
-
328
-
329
- <div id="validate-method" class="method-detail ">
330
- <a name="method-i-validate"></a>
331
-
332
-
333
- <div class="method-heading">
334
- <span class="method-name">validate</span><span
335
- class="method-args">()</span>
336
- <span class="method-click-advice">click to toggle source</span>
337
- </div>
338
-
339
-
340
- <div class="method-description">
341
-
342
- <p>Validates the input ensuring the arguments are both valid folders</p>
343
-
344
-
345
-
346
- <div class="method-source-code" id="validate-source">
347
- <pre>
348
- <span class="ruby-comment"># File lib/hashthattree.rb, line 28</span>
349
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">validate</span>
350
- <span class="ruby-keyword">if</span>(<span class="ruby-identifier">folder1</span><span class="ruby-operator">==</span><span class="ruby-keyword">nil</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">folder1</span><span class="ruby-operator">==</span><span class="ruby-string">&quot;&quot;</span>) <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">folder1</span>)
351
- <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;a valid folder path is required as argument 1&quot;</span>
352
- <span class="ruby-identifier">exit</span>
353
- <span class="ruby-keyword">end</span>
354
-
355
- <span class="ruby-keyword">if</span>(<span class="ruby-identifier">folder2</span><span class="ruby-operator">==</span><span class="ruby-keyword">nil</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">folder2</span><span class="ruby-operator">==</span><span class="ruby-string">&quot;&quot;</span>) <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-constant">Dir</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">folder2</span>)
356
- <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;a valid folder path is required as argument 2&quot;</span>
357
- <span class="ruby-identifier">exit</span>
358
- <span class="ruby-keyword">end</span>
359
-
360
- <span class="ruby-keyword">end</span></pre>
361
- </div><!-- validate-source -->
362
-
363
- </div>
364
-
365
-
366
-
367
-
368
- </div><!-- validate-method -->
369
-
370
-
371
- </div><!-- public-instance-method-details -->
372
-
373
- </div><!-- 5Buntitled-5D -->
374
-
375
-
376
- </div><!-- documentation -->
377
-
378
- <div id="validator-badges">
379
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
380
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
381
- Rdoc Generator</a> 2</small>.</p>
382
- </div>
383
-
384
- </body>
385
- </html>
386
-