nanook 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/nanook/version.rb +1 -1
  4. data/nanook.gemspec +1 -1
  5. metadata +1 -185
  6. data/docs/0.7.0/apple-touch-icon.png +0 -0
  7. data/docs/0.7.0/classes/Nanook.html +0 -572
  8. data/docs/0.7.0/classes/Nanook/Account.html +0 -909
  9. data/docs/0.7.0/classes/Nanook/Block.html +0 -717
  10. data/docs/0.7.0/classes/Nanook/Error.html +0 -84
  11. data/docs/0.7.0/classes/Nanook/Key.html +0 -253
  12. data/docs/0.7.0/classes/Nanook/Node.html +0 -657
  13. data/docs/0.7.0/classes/Nanook/Rpc.html +0 -247
  14. data/docs/0.7.0/classes/Nanook/Util.html +0 -197
  15. data/docs/0.7.0/classes/Nanook/Wallet.html +0 -986
  16. data/docs/0.7.0/classes/Nanook/WalletAccount.html +0 -446
  17. data/docs/0.7.0/classes/Nanook/WorkPeer.html +0 -294
  18. data/docs/0.7.0/created.rid +0 -14
  19. data/docs/0.7.0/css/github.css +0 -123
  20. data/docs/0.7.0/css/main.css +0 -374
  21. data/docs/0.7.0/css/panel.css +0 -360
  22. data/docs/0.7.0/css/reset.css +0 -48
  23. data/docs/0.7.0/favicon.ico +0 -0
  24. data/docs/0.7.0/files/README_md.html +0 -418
  25. data/docs/0.7.0/files/lib/nanook/account_rb.html +0 -89
  26. data/docs/0.7.0/files/lib/nanook/block_rb.html +0 -89
  27. data/docs/0.7.0/files/lib/nanook/error_rb.html +0 -89
  28. data/docs/0.7.0/files/lib/nanook/key_rb.html +0 -89
  29. data/docs/0.7.0/files/lib/nanook/node_rb.html +0 -89
  30. data/docs/0.7.0/files/lib/nanook/rpc_rb.html +0 -99
  31. data/docs/0.7.0/files/lib/nanook/util_rb.html +0 -89
  32. data/docs/0.7.0/files/lib/nanook/version_rb.html +0 -84
  33. data/docs/0.7.0/files/lib/nanook/wallet_account_rb.html +0 -89
  34. data/docs/0.7.0/files/lib/nanook/wallet_rb.html +0 -89
  35. data/docs/0.7.0/files/lib/nanook/work_peer_rb.html +0 -89
  36. data/docs/0.7.0/files/lib/nanook_rb.html +0 -94
  37. data/docs/0.7.0/i/arrow-down.svg +0 -8
  38. data/docs/0.7.0/i/arrow-right.svg +0 -8
  39. data/docs/0.7.0/i/search.svg +0 -12
  40. data/docs/0.7.0/i/tree_bg.svg +0 -8
  41. data/docs/0.7.0/index.html +0 -11
  42. data/docs/0.7.0/js/highlight.pack.js +0 -1
  43. data/docs/0.7.0/js/jquery-1.3.2.min.js +0 -19
  44. data/docs/0.7.0/js/main.js +0 -25
  45. data/docs/0.7.0/js/navigation.js +0 -142
  46. data/docs/0.7.0/js/search_index.js +0 -1
  47. data/docs/0.7.0/js/searchdoc.js +0 -465
  48. data/docs/0.7.0/js/searcher.js +0 -229
  49. data/docs/0.7.0/panel/index.html +0 -47
  50. data/docs/0.7.0/panel/links.html +0 -32
  51. data/docs/0.7.0/panel/tree.js +0 -1
  52. data/docs/0.8.0/apple-touch-icon.png +0 -0
  53. data/docs/0.8.0/classes/Nanook.html +0 -621
  54. data/docs/0.8.0/classes/Nanook/Account.html +0 -971
  55. data/docs/0.8.0/classes/Nanook/Block.html +0 -759
  56. data/docs/0.8.0/classes/Nanook/Error.html +0 -84
  57. data/docs/0.8.0/classes/Nanook/Key.html +0 -295
  58. data/docs/0.8.0/classes/Nanook/Node.html +0 -657
  59. data/docs/0.8.0/classes/Nanook/Rpc.html +0 -247
  60. data/docs/0.8.0/classes/Nanook/Util.html +0 -264
  61. data/docs/0.8.0/classes/Nanook/Wallet.html +0 -1056
  62. data/docs/0.8.0/classes/Nanook/WalletAccount.html +0 -582
  63. data/docs/0.8.0/classes/Nanook/WorkPeer.html +0 -294
  64. data/docs/0.8.0/created.rid +0 -14
  65. data/docs/0.8.0/css/github.css +0 -123
  66. data/docs/0.8.0/css/main.css +0 -374
  67. data/docs/0.8.0/css/panel.css +0 -360
  68. data/docs/0.8.0/css/reset.css +0 -48
  69. data/docs/0.8.0/favicon.ico +0 -0
  70. data/docs/0.8.0/files/README_md.html +0 -423
  71. data/docs/0.8.0/files/lib/nanook/account_rb.html +0 -89
  72. data/docs/0.8.0/files/lib/nanook/block_rb.html +0 -89
  73. data/docs/0.8.0/files/lib/nanook/error_rb.html +0 -89
  74. data/docs/0.8.0/files/lib/nanook/key_rb.html +0 -89
  75. data/docs/0.8.0/files/lib/nanook/node_rb.html +0 -89
  76. data/docs/0.8.0/files/lib/nanook/rpc_rb.html +0 -99
  77. data/docs/0.8.0/files/lib/nanook/util_rb.html +0 -97
  78. data/docs/0.8.0/files/lib/nanook/version_rb.html +0 -84
  79. data/docs/0.8.0/files/lib/nanook/wallet_account_rb.html +0 -89
  80. data/docs/0.8.0/files/lib/nanook/wallet_rb.html +0 -89
  81. data/docs/0.8.0/files/lib/nanook/work_peer_rb.html +0 -89
  82. data/docs/0.8.0/files/lib/nanook_rb.html +0 -94
  83. data/docs/0.8.0/i/arrow-down.svg +0 -8
  84. data/docs/0.8.0/i/arrow-right.svg +0 -8
  85. data/docs/0.8.0/i/search.svg +0 -12
  86. data/docs/0.8.0/i/tree_bg.svg +0 -8
  87. data/docs/0.8.0/index.html +0 -11
  88. data/docs/0.8.0/js/highlight.pack.js +0 -1
  89. data/docs/0.8.0/js/jquery-1.3.2.min.js +0 -19
  90. data/docs/0.8.0/js/main.js +0 -25
  91. data/docs/0.8.0/js/navigation.js +0 -142
  92. data/docs/0.8.0/js/search_index.js +0 -1
  93. data/docs/0.8.0/js/searchdoc.js +0 -465
  94. data/docs/0.8.0/js/searcher.js +0 -229
  95. data/docs/0.8.0/panel/index.html +0 -47
  96. data/docs/0.8.0/panel/links.html +0 -32
  97. data/docs/0.8.0/panel/tree.js +0 -1
  98. data/docs/1.0.0/apple-touch-icon.png +0 -0
  99. data/docs/1.0.0/classes/Nanook.html +0 -621
  100. data/docs/1.0.0/classes/Nanook/Account.html +0 -989
  101. data/docs/1.0.0/classes/Nanook/Block.html +0 -929
  102. data/docs/1.0.0/classes/Nanook/Error.html +0 -84
  103. data/docs/1.0.0/classes/Nanook/Key.html +0 -295
  104. data/docs/1.0.0/classes/Nanook/Node.html +0 -657
  105. data/docs/1.0.0/classes/Nanook/Rpc.html +0 -247
  106. data/docs/1.0.0/classes/Nanook/Util.html +0 -264
  107. data/docs/1.0.0/classes/Nanook/Wallet.html +0 -1084
  108. data/docs/1.0.0/classes/Nanook/WalletAccount.html +0 -582
  109. data/docs/1.0.0/classes/Nanook/WorkPeer.html +0 -294
  110. data/docs/1.0.0/created.rid +0 -14
  111. data/docs/1.0.0/css/github.css +0 -123
  112. data/docs/1.0.0/css/main.css +0 -374
  113. data/docs/1.0.0/css/panel.css +0 -360
  114. data/docs/1.0.0/css/reset.css +0 -48
  115. data/docs/1.0.0/favicon.ico +0 -0
  116. data/docs/1.0.0/files/README_md.html +0 -443
  117. data/docs/1.0.0/files/lib/nanook/account_rb.html +0 -89
  118. data/docs/1.0.0/files/lib/nanook/block_rb.html +0 -89
  119. data/docs/1.0.0/files/lib/nanook/error_rb.html +0 -89
  120. data/docs/1.0.0/files/lib/nanook/key_rb.html +0 -89
  121. data/docs/1.0.0/files/lib/nanook/node_rb.html +0 -89
  122. data/docs/1.0.0/files/lib/nanook/rpc_rb.html +0 -99
  123. data/docs/1.0.0/files/lib/nanook/util_rb.html +0 -97
  124. data/docs/1.0.0/files/lib/nanook/version_rb.html +0 -84
  125. data/docs/1.0.0/files/lib/nanook/wallet_account_rb.html +0 -89
  126. data/docs/1.0.0/files/lib/nanook/wallet_rb.html +0 -89
  127. data/docs/1.0.0/files/lib/nanook/work_peer_rb.html +0 -89
  128. data/docs/1.0.0/files/lib/nanook_rb.html +0 -94
  129. data/docs/1.0.0/i/arrow-down.svg +0 -8
  130. data/docs/1.0.0/i/arrow-right.svg +0 -8
  131. data/docs/1.0.0/i/search.svg +0 -12
  132. data/docs/1.0.0/i/tree_bg.svg +0 -8
  133. data/docs/1.0.0/index.html +0 -11
  134. data/docs/1.0.0/js/highlight.pack.js +0 -1
  135. data/docs/1.0.0/js/jquery-1.3.2.min.js +0 -19
  136. data/docs/1.0.0/js/main.js +0 -25
  137. data/docs/1.0.0/js/navigation.js +0 -142
  138. data/docs/1.0.0/js/search_index.js +0 -1
  139. data/docs/1.0.0/js/searchdoc.js +0 -465
  140. data/docs/1.0.0/js/searcher.js +0 -229
  141. data/docs/1.0.0/panel/index.html +0 -47
  142. data/docs/1.0.0/panel/links.html +0 -32
  143. data/docs/1.0.0/panel/tree.js +0 -1
  144. data/docs/apple-touch-icon.png +0 -0
  145. data/docs/classes/Nanook.html +0 -572
  146. data/docs/classes/Nanook/Account.html +0 -907
  147. data/docs/classes/Nanook/Block.html +0 -717
  148. data/docs/classes/Nanook/Error.html +0 -84
  149. data/docs/classes/Nanook/Key.html +0 -253
  150. data/docs/classes/Nanook/Node.html +0 -657
  151. data/docs/classes/Nanook/Rpc.html +0 -247
  152. data/docs/classes/Nanook/Util.html +0 -197
  153. data/docs/classes/Nanook/Wallet.html +0 -778
  154. data/docs/classes/Nanook/WalletAccount.html +0 -447
  155. data/docs/classes/Nanook/WorkPeer.html +0 -294
  156. data/docs/created.rid +0 -14
  157. data/docs/css/github.css +0 -123
  158. data/docs/css/main.css +0 -374
  159. data/docs/css/panel.css +0 -360
  160. data/docs/css/reset.css +0 -48
  161. data/docs/favicon.ico +0 -0
  162. data/docs/files/README_md.html +0 -408
  163. data/docs/files/lib/nanook/account_rb.html +0 -89
  164. data/docs/files/lib/nanook/block_rb.html +0 -89
  165. data/docs/files/lib/nanook/error_rb.html +0 -89
  166. data/docs/files/lib/nanook/key_rb.html +0 -89
  167. data/docs/files/lib/nanook/node_rb.html +0 -89
  168. data/docs/files/lib/nanook/rpc_rb.html +0 -99
  169. data/docs/files/lib/nanook/util_rb.html +0 -89
  170. data/docs/files/lib/nanook/version_rb.html +0 -84
  171. data/docs/files/lib/nanook/wallet_account_rb.html +0 -89
  172. data/docs/files/lib/nanook/wallet_rb.html +0 -89
  173. data/docs/files/lib/nanook/work_peer_rb.html +0 -89
  174. data/docs/files/lib/nanook_rb.html +0 -94
  175. data/docs/i/arrow-down.svg +0 -8
  176. data/docs/i/arrow-right.svg +0 -8
  177. data/docs/i/search.svg +0 -12
  178. data/docs/i/tree_bg.svg +0 -8
  179. data/docs/index.html +0 -11
  180. data/docs/js/highlight.pack.js +0 -1
  181. data/docs/js/jquery-1.3.2.min.js +0 -19
  182. data/docs/js/main.js +0 -25
  183. data/docs/js/navigation.js +0 -142
  184. data/docs/js/search_index.js +0 -1
  185. data/docs/js/searchdoc.js +0 -465
  186. data/docs/js/searcher.js +0 -229
  187. data/docs/panel/index.html +0 -47
  188. data/docs/panel/links.html +0 -32
  189. data/docs/panel/tree.js +0 -1
@@ -1,229 +0,0 @@
1
- Searcher = function(data) {
2
- this.data = data;
3
- this.handlers = [];
4
- }
5
-
6
- Searcher.prototype = new function() {
7
- // search is performed in chunks of 1000 for non-blocking user input
8
- var CHUNK_SIZE = 1000;
9
- // do not try to find more than 100 results
10
- var MAX_RESULTS = 100;
11
- var huid = 1;
12
- var suid = 1;
13
- var runs = 0;
14
-
15
- this.find = function(query) {
16
- var queries = splitQuery(query);
17
- var regexps = buildRegexps(queries);
18
- var highlighters = buildHilighters(queries);
19
- var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++};
20
- var _this = this;
21
-
22
- this.currentSuid = state.n;
23
-
24
- if (!query) return;
25
-
26
- var run = function() {
27
- // stop current search thread if new search started
28
- if (state.n != _this.currentSuid) return;
29
-
30
- var results =
31
- performSearch(_this.data, regexps, queries, highlighters, state);
32
- var hasMore = (state.limit > 0 && state.pass < 4);
33
-
34
- triggerResults.call(_this, results, !hasMore);
35
- if (hasMore) {
36
- setTimeout(run, 2);
37
- }
38
- runs++;
39
- };
40
- runs = 0;
41
-
42
- // start search thread
43
- run();
44
- }
45
-
46
- /* ----- Events ------ */
47
- this.ready = function(fn) {
48
- fn.huid = huid;
49
- this.handlers.push(fn);
50
- }
51
-
52
- /* ----- Utilities ------ */
53
- function splitQuery(query) {
54
- return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) {
55
- return string.match(/\S/);
56
- });
57
- }
58
-
59
- function buildRegexps(queries) {
60
- return jQuery.map(queries, function(query) {
61
- return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i');
62
- });
63
- }
64
-
65
- function buildHilighters(queries) {
66
- return jQuery.map(queries, function(query) {
67
- return jQuery.map(query.split(''), function(l, i) {
68
- return '\u0001$' + (i*2+1) + '\u0002$' + (i*2+2);
69
- }).join('');
70
- });
71
- }
72
-
73
- // function longMatchRegexp(index, longIndex, regexps) {
74
- // for (var i = regexps.length - 1; i >= 0; i--){
75
- // if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false;
76
- // };
77
- // return true;
78
- // }
79
-
80
-
81
- /* ----- Mathchers ------ */
82
-
83
- /*
84
- * This record matches if the index starts with queries[0] and the record
85
- * matches all of the regexps
86
- */
87
- function matchPassBeginning(index, longIndex, queries, regexps) {
88
- if (index.indexOf(queries[0]) != 0) return false;
89
- for (var i=1, l = regexps.length; i < l; i++) {
90
- if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
91
- return false;
92
- };
93
- return true;
94
- }
95
-
96
- /*
97
- * This record matches if the longIndex starts with queries[0] and the
98
- * longIndex matches all of the regexps
99
- */
100
- function matchPassLongIndex(index, longIndex, queries, regexps) {
101
- if (longIndex.indexOf(queries[0]) != 0) return false;
102
- for (var i=1, l = regexps.length; i < l; i++) {
103
- if (!longIndex.match(regexps[i]))
104
- return false;
105
- };
106
- return true;
107
- }
108
-
109
- /*
110
- * This record matches if the index contains queries[0] and the record
111
- * matches all of the regexps
112
- */
113
- function matchPassContains(index, longIndex, queries, regexps) {
114
- if (index.indexOf(queries[0]) == -1) return false;
115
- for (var i=1, l = regexps.length; i < l; i++) {
116
- if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
117
- return false;
118
- };
119
- return true;
120
- }
121
-
122
- /*
123
- * This record matches if regexps[0] matches the index and the record
124
- * matches all of the regexps
125
- */
126
- function matchPassRegexp(index, longIndex, queries, regexps) {
127
- if (!index.match(regexps[0])) return false;
128
- for (var i=1, l = regexps.length; i < l; i++) {
129
- if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
130
- return false;
131
- };
132
- return true;
133
- }
134
-
135
-
136
- /* ----- Highlighters ------ */
137
- function highlightRegexp(info, queries, regexps, highlighters) {
138
- var result = createResult(info);
139
- for (var i=0, l = regexps.length; i < l; i++) {
140
- result.title = result.title.replace(regexps[i], highlighters[i]);
141
- result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
142
- };
143
- return result;
144
- }
145
-
146
- function hltSubstring(string, pos, length) {
147
- return string.substring(0, pos) + '\u0001' + string.substring(pos, pos + length) + '\u0002' + string.substring(pos + length);
148
- }
149
-
150
- function highlightQuery(info, queries, regexps, highlighters) {
151
- var result = createResult(info);
152
- var pos = 0;
153
- var lcTitle = result.title.toLowerCase();
154
-
155
- pos = lcTitle.indexOf(queries[0]);
156
- if (pos != -1) {
157
- result.title = hltSubstring(result.title, pos, queries[0].length);
158
- }
159
-
160
- result.namespace = result.namespace.replace(regexps[0], highlighters[0]);
161
- for (var i=1, l = regexps.length; i < l; i++) {
162
- result.title = result.title.replace(regexps[i], highlighters[i]);
163
- result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
164
- };
165
- return result;
166
- }
167
-
168
- function createResult(info) {
169
- var result = {};
170
- result.title = info[0];
171
- result.namespace = info[1];
172
- result.path = info[2];
173
- result.params = info[3];
174
- result.snippet = info[4];
175
- result.badge = info[6];
176
- return result;
177
- }
178
-
179
- /* ----- Searching ------ */
180
- function performSearch(data, regexps, queries, highlighters, state) {
181
- var searchIndex = data.searchIndex;
182
- var longSearchIndex = data.longSearchIndex;
183
- var info = data.info;
184
- var result = [];
185
- var i = state.from;
186
- var l = searchIndex.length;
187
- var togo = CHUNK_SIZE;
188
- var matchFunc, hltFunc;
189
-
190
- while (state.pass < 4 && state.limit > 0 && togo > 0) {
191
- if (state.pass == 0) {
192
- matchFunc = matchPassBeginning;
193
- hltFunc = highlightQuery;
194
- } else if (state.pass == 1) {
195
- matchFunc = matchPassLongIndex;
196
- hltFunc = highlightQuery;
197
- } else if (state.pass == 2) {
198
- matchFunc = matchPassContains;
199
- hltFunc = highlightQuery;
200
- } else if (state.pass == 3) {
201
- matchFunc = matchPassRegexp;
202
- hltFunc = highlightRegexp;
203
- }
204
-
205
- for (; togo > 0 && i < l && state.limit > 0; i++, togo--) {
206
- if (info[i].n == state.n) continue;
207
- if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) {
208
- info[i].n = state.n;
209
- result.push(hltFunc(info[i], queries, regexps, highlighters));
210
- state.limit--;
211
- }
212
- };
213
- if (searchIndex.length <= i) {
214
- state.pass++;
215
- i = state.from = 0;
216
- } else {
217
- state.from = i;
218
- }
219
- }
220
- return result;
221
- }
222
-
223
- function triggerResults(results, isLast) {
224
- jQuery.each(this.handlers, function(i, fn) {
225
- fn.call(this, results, isLast)
226
- })
227
- }
228
- }
229
-
@@ -1,47 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>search index</title>
5
- <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" charset="utf-8" />
6
- <link rel="stylesheet" href="../css/panel.css" type="text/css" media="screen" charset="utf-8" />
7
- <script src="../js/search_index.js" type="text/javascript" charset="utf-8"></script>
8
- <script src="../js/searcher.js" type="text/javascript" charset="utf-8"></script>
9
- <script src="tree.js" type="text/javascript" charset="utf-8"></script>
10
- <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
11
- <script src="../js/searchdoc.js" type="text/javascript" charset="utf-8"></script>
12
- <script type="text/javascript" charset="utf-8">
13
- $(function() {
14
- $('#links').hide();
15
- var panel = new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
16
- $('#search').focus();
17
-
18
- var s = window.parent.location.search.match(/\?q=([^&]+)/);
19
- if (s) {
20
- s = decodeURIComponent(s[1]).replace(/\+/g, ' ');
21
- if (s.length > 0) {
22
- $('#search').val(s);
23
- panel.search(s, true);
24
- }
25
- }
26
- })
27
- </script>
28
- </head>
29
-
30
- <body>
31
- <div class="panel panel_tree" id="panel">
32
- <div class="header">
33
- <input type="text" placeholder="Search for a class, method, ..." autosave="searchdoc" results="10" id="search" autocomplete="off" />
34
- </div>
35
- <div class="tree">
36
- <ul>
37
- </ul>
38
- </div>
39
- <div class="result">
40
- <ul>
41
- </ul>
42
- </div>
43
- </div>
44
- <a href="links.html" id="links">index</a>
45
- </body>
46
-
47
- </html>
@@ -1,32 +0,0 @@
1
- <html>
2
- <head>File index</head>
3
- <body>
4
-
5
- <a href="../files/README_md.html">README.md</a>
6
-
7
- <a href="../files/lib/nanook_rb.html">lib/nanook.rb</a>
8
-
9
- <a href="../files/lib/nanook/account_rb.html">lib/nanook/account.rb</a>
10
-
11
- <a href="../files/lib/nanook/block_rb.html">lib/nanook/block.rb</a>
12
-
13
- <a href="../files/lib/nanook/error_rb.html">lib/nanook/error.rb</a>
14
-
15
- <a href="../files/lib/nanook/key_rb.html">lib/nanook/key.rb</a>
16
-
17
- <a href="../files/lib/nanook/node_rb.html">lib/nanook/node.rb</a>
18
-
19
- <a href="../files/lib/nanook/rpc_rb.html">lib/nanook/rpc.rb</a>
20
-
21
- <a href="../files/lib/nanook/util_rb.html">lib/nanook/util.rb</a>
22
-
23
- <a href="../files/lib/nanook/version_rb.html">lib/nanook/version.rb</a>
24
-
25
- <a href="../files/lib/nanook/wallet_rb.html">lib/nanook/wallet.rb</a>
26
-
27
- <a href="../files/lib/nanook/wallet_account_rb.html">lib/nanook/wallet_account.rb</a>
28
-
29
- <a href="../files/lib/nanook/work_peer_rb.html">lib/nanook/work_peer.rb</a>
30
-
31
- </body>
32
- </html>
@@ -1 +0,0 @@
1
- var tree = [["","","files",[["README.md","files/README_md.html","",[]],["","","lib",[["","","nanook",[["account.rb","files/lib/nanook/account_rb.html","",[]],["block.rb","files/lib/nanook/block_rb.html","",[]],["error.rb","files/lib/nanook/error_rb.html","",[]],["key.rb","files/lib/nanook/key_rb.html","",[]],["node.rb","files/lib/nanook/node_rb.html","",[]],["rpc.rb","files/lib/nanook/rpc_rb.html","",[]],["util.rb","files/lib/nanook/util_rb.html","",[]],["version.rb","files/lib/nanook/version_rb.html","",[]],["wallet.rb","files/lib/nanook/wallet_rb.html","",[]],["wallet_account.rb","files/lib/nanook/wallet_account_rb.html","",[]],["work_peer.rb","files/lib/nanook/work_peer_rb.html","",[]]]],["nanook.rb","files/lib/nanook_rb.html","",[]]]]]],["Nanook","classes/Nanook.html"," < Object",[["Account","classes/Nanook/Account.html"," < Object",[]],["Block","classes/Nanook/Block.html"," < Object",[]],["Error","classes/Nanook/Error.html"," < StandardError",[]],["Key","classes/Nanook/Key.html"," < Object",[]],["Node","classes/Nanook/Node.html"," < Object",[]],["Rpc","classes/Nanook/Rpc.html"," < Object",[]],["Util","classes/Nanook/Util.html"," < Object",[]],["Wallet","classes/Nanook/Wallet.html"," < Object",[]],["WalletAccount","classes/Nanook/WalletAccount.html"," < Object",[]],["WorkPeer","classes/Nanook/WorkPeer.html"," < Object",[]]]]]
@@ -1,621 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook</title>
5
- <meta charset="UTF-8" />
6
- <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
7
- <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
8
- <link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" />
9
- <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
10
- <script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
11
- <script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
12
-
13
-
14
- <meta property="og:title" value="Nanook">
15
-
16
-
17
-
18
- <meta name="description" content="Initializing Connect to the default RPC host at localhost:7076 and with a timeout of 500 seconds: nanook = Nanook.new To connect to another host instead: nanook = Nanook.">
19
- <meta property="og:description" content="Initializing Connect to the default RPC host at localhost:7076 and with a timeout of 500 seconds: nanook = Nanook.new To connect to another host instead: nanook = Nanook.">
20
-
21
-
22
- <meta name="keywords" content="Nanook class">
23
-
24
- <meta name="keywords" content="new, account, block, inspect, key, node, wallet, work_peers">
25
-
26
- </head>
27
-
28
- <body>
29
- <div class="banner">
30
-
31
- <h1>
32
- <span class="type">Class</span>
33
- Nanook
34
-
35
- <span class="parent">&lt;
36
-
37
- Object
38
-
39
- </span>
40
-
41
- </h1>
42
- <ul class="files">
43
-
44
- <li><a href="../files/lib/nanook_rb.html">lib/nanook.rb</a></li>
45
-
46
- <li><a href="../files/lib/nanook/account_rb.html">lib/nanook/account.rb</a></li>
47
-
48
- <li><a href="../files/lib/nanook/block_rb.html">lib/nanook/block.rb</a></li>
49
-
50
- <li><a href="../files/lib/nanook/error_rb.html">lib/nanook/error.rb</a></li>
51
-
52
- <li><a href="../files/lib/nanook/key_rb.html">lib/nanook/key.rb</a></li>
53
-
54
- <li><a href="../files/lib/nanook/node_rb.html">lib/nanook/node.rb</a></li>
55
-
56
- <li><a href="../files/lib/nanook/rpc_rb.html">lib/nanook/rpc.rb</a></li>
57
-
58
- <li><a href="../files/lib/nanook/util_rb.html">lib/nanook/util.rb</a></li>
59
-
60
- <li><a href="../files/lib/nanook/version_rb.html">lib/nanook/version.rb</a></li>
61
-
62
- <li><a href="../files/lib/nanook/wallet_rb.html">lib/nanook/wallet.rb</a></li>
63
-
64
- <li><a href="../files/lib/nanook/wallet_account_rb.html">lib/nanook/wallet_account.rb</a></li>
65
-
66
- <li><a href="../files/lib/nanook/work_peer_rb.html">lib/nanook/work_peer.rb</a></li>
67
-
68
- </ul>
69
- </div>
70
- <div id="bodyContent">
71
- <div id="content">
72
-
73
- <div class="description">
74
-
75
- <h4 id="class-Nanook-label-Initializing">Initializing</h4>
76
-
77
- <p>Connect to the default RPC host at <a
78
- href="http://localhost:7076">localhost:7076</a> and with a timeout of 500
79
- seconds:</p>
80
-
81
- <pre><code>nanook = Nanook.new
82
- </code></pre>
83
-
84
- <p>To connect to another host instead:</p>
85
-
86
- <pre><code>nanook = Nanook.new(&quot;http://ip6-localhost.com:7076&quot;)
87
- </code></pre>
88
-
89
- <p>To give a specific timeout value:</p>
90
-
91
- <pre><code>Nanook.new(timeout: 600)
92
- Nanook.new(&quot;http://ip6-localhost.com:7076&quot;, timeout: 600)
93
- </code></pre>
94
-
95
- </div>
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- <!-- Namespace -->
108
- <div class="sectiontitle">Namespace</div>
109
- <ul>
110
-
111
- <li>
112
- <span class="type">CLASS</span>
113
- <a href="Nanook/Account.html">Nanook::Account</a>
114
- </li>
115
-
116
- <li>
117
- <span class="type">CLASS</span>
118
- <a href="Nanook/Block.html">Nanook::Block</a>
119
- </li>
120
-
121
- <li>
122
- <span class="type">CLASS</span>
123
- <a href="Nanook/Error.html">Nanook::Error</a>
124
- </li>
125
-
126
- <li>
127
- <span class="type">CLASS</span>
128
- <a href="Nanook/Key.html">Nanook::Key</a>
129
- </li>
130
-
131
- <li>
132
- <span class="type">CLASS</span>
133
- <a href="Nanook/Node.html">Nanook::Node</a>
134
- </li>
135
-
136
- <li>
137
- <span class="type">CLASS</span>
138
- <a href="Nanook/Rpc.html">Nanook::Rpc</a>
139
- </li>
140
-
141
- <li>
142
- <span class="type">CLASS</span>
143
- <a href="Nanook/Util.html">Nanook::Util</a>
144
- </li>
145
-
146
- <li>
147
- <span class="type">CLASS</span>
148
- <a href="Nanook/Wallet.html">Nanook::Wallet</a>
149
- </li>
150
-
151
- <li>
152
- <span class="type">CLASS</span>
153
- <a href="Nanook/WalletAccount.html">Nanook::WalletAccount</a>
154
- </li>
155
-
156
- <li>
157
- <span class="type">CLASS</span>
158
- <a href="Nanook/WorkPeer.html">Nanook::WorkPeer</a>
159
- </li>
160
-
161
- </ul>
162
-
163
-
164
-
165
-
166
- <!-- Method ref -->
167
- <div class="sectiontitle">Methods</div>
168
- <dl class="methods">
169
-
170
- <dt>A</dt>
171
- <dd>
172
- <ul>
173
-
174
-
175
- <li>
176
- <a href="#method-i-account">account</a>
177
- </li>
178
-
179
- </ul>
180
- </dd>
181
-
182
- <dt>B</dt>
183
- <dd>
184
- <ul>
185
-
186
-
187
- <li>
188
- <a href="#method-i-block">block</a>
189
- </li>
190
-
191
- </ul>
192
- </dd>
193
-
194
- <dt>I</dt>
195
- <dd>
196
- <ul>
197
-
198
-
199
- <li>
200
- <a href="#method-i-inspect">inspect</a>
201
- </li>
202
-
203
- </ul>
204
- </dd>
205
-
206
- <dt>K</dt>
207
- <dd>
208
- <ul>
209
-
210
-
211
- <li>
212
- <a href="#method-i-key">key</a>
213
- </li>
214
-
215
- </ul>
216
- </dd>
217
-
218
- <dt>N</dt>
219
- <dd>
220
- <ul>
221
-
222
-
223
- <li>
224
- <a href="#method-c-new">new</a>,
225
- </li>
226
-
227
-
228
- <li>
229
- <a href="#method-i-node">node</a>
230
- </li>
231
-
232
- </ul>
233
- </dd>
234
-
235
- <dt>W</dt>
236
- <dd>
237
- <ul>
238
-
239
-
240
- <li>
241
- <a href="#method-i-wallet">wallet</a>,
242
- </li>
243
-
244
-
245
- <li>
246
- <a href="#method-i-work_peers">work_peers</a>
247
- </li>
248
-
249
- </ul>
250
- </dd>
251
-
252
- </dl>
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
- <!-- Section constants -->
267
- <div class="sectiontitle">Constants</div>
268
- <table border='0' cellpadding='5'>
269
-
270
- <tr valign='top'>
271
- <td class="attr-name">VERSION</td>
272
- <td>=</td>
273
- <td class="attr-value">&quot;1.0.0&quot;</td>
274
- </tr>
275
-
276
- <tr valign='top'>
277
- <td>&nbsp;</td>
278
- <td colspan="2" class="attr-desc"></td>
279
- </tr>
280
-
281
-
282
- </table>
283
-
284
-
285
-
286
-
287
-
288
-
289
- <!-- Methods -->
290
-
291
- <div class="sectiontitle">Class Public methods</div>
292
-
293
- <div class="method">
294
- <div class="title method-title" id="method-c-new">
295
-
296
- <b>new</b>(uri=Nanook::Rpc::DEFAULT_URI, timeout:Nanook::Rpc::DEFAULT_TIMEOUT)
297
-
298
- <a href="../classes/Nanook.html#method-c-new" name="method-c-new" class="permalink">Link</a>
299
- </div>
300
-
301
-
302
- <div class="description">
303
- <h4 id="method-c-new-label-Arguments">Arguments</h4>
304
- <ul><li>
305
- <p><code>uri</code> - RPC host to connect to (default is “<a
306
- href="http://localhost:7076">localhost:7076</a>”)</p>
307
- </li><li>
308
- <p><code>timeout:</code> - Connection timeout in number of seconds (default is
309
- 500)</p>
310
- </li></ul>
311
-
312
- <h4 id="method-c-new-label-Examples">Examples</h4>
313
-
314
- <pre><code>Nanook.new # Connect to http://localhost:7076 with 500s timeout
315
-
316
- Nanook.new(timeout: 600)
317
- Nanook.new(&quot;http://ip6-localhost.com:7076&quot;, timeout: 600)
318
- </code></pre>
319
- </div>
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
- <div class="sourcecode">
329
-
330
- <p class="source-link">
331
- Source:
332
- <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
333
-
334
- </p>
335
- <div id="method-c-new_source" class="dyn-source">
336
- <pre><span class="ruby-comment"># File lib/nanook.rb, line 33</span>
337
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">uri</span>=<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Rpc</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_URI</span>, <span class="ruby-value">timeout:</span><span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Rpc</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_TIMEOUT</span>)
338
- <span class="ruby-ivar">@rpc</span> = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Rpc</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-value">timeout:</span> <span class="ruby-identifier">timeout</span>)
339
- <span class="ruby-keyword">end</span></pre>
340
- </div>
341
- </div>
342
-
343
- </div>
344
-
345
-
346
-
347
- <div class="sectiontitle">Instance Public methods</div>
348
-
349
- <div class="method">
350
- <div class="title method-title" id="method-i-account">
351
-
352
- <b>account</b>(account=nil)
353
-
354
- <a href="../classes/Nanook.html#method-i-account" name="method-i-account" class="permalink">Link</a>
355
- </div>
356
-
357
-
358
- <div class="description">
359
- <p>Returns a <a href="Nanook/Account.html">Nanook::Account</a> instance.</p>
360
-
361
- <pre><code>nanook = Nanook.new
362
-
363
- account = nanook.account
364
- account = nanook.account(&quot;xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000&quot;)
365
- </code></pre>
366
- </div>
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
- <div class="sourcecode">
376
-
377
- <p class="source-link">
378
- Source:
379
- <a href="javascript:toggleSource('method-i-account_source')" id="l_method-i-account_source">show</a>
380
-
381
- </p>
382
- <div id="method-i-account_source" class="dyn-source">
383
- <pre><span class="ruby-comment"># File lib/nanook.rb, line 44</span>
384
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">account</span>(<span class="ruby-identifier">account</span>=<span class="ruby-keyword">nil</span>)
385
- <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Account</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-identifier">account</span>)
386
- <span class="ruby-keyword">end</span></pre>
387
- </div>
388
- </div>
389
-
390
- </div>
391
-
392
- <div class="method">
393
- <div class="title method-title" id="method-i-block">
394
-
395
- <b>block</b>(block=nil)
396
-
397
- <a href="../classes/Nanook.html#method-i-block" name="method-i-block" class="permalink">Link</a>
398
- </div>
399
-
400
-
401
- <div class="description">
402
-
403
- </div>
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
-
412
- <div class="sourcecode">
413
-
414
- <p class="source-link">
415
- Source:
416
- <a href="javascript:toggleSource('method-i-block_source')" id="l_method-i-block_source">show</a>
417
-
418
- </p>
419
- <div id="method-i-block_source" class="dyn-source">
420
- <pre><span class="ruby-comment"># File lib/nanook.rb, line 48</span>
421
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">block</span>(<span class="ruby-identifier">block</span>=<span class="ruby-keyword">nil</span>)
422
- <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Block</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-identifier">block</span>)
423
- <span class="ruby-keyword">end</span></pre>
424
- </div>
425
- </div>
426
-
427
- </div>
428
-
429
- <div class="method">
430
- <div class="title method-title" id="method-i-inspect">
431
-
432
- <b>inspect</b>()
433
-
434
- <a href="../classes/Nanook.html#method-i-inspect" name="method-i-inspect" class="permalink">Link</a>
435
- </div>
436
-
437
-
438
- <div class="description">
439
-
440
- </div>
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
-
449
- <div class="sourcecode">
450
-
451
- <p class="source-link">
452
- Source:
453
- <a href="javascript:toggleSource('method-i-inspect_source')" id="l_method-i-inspect_source">show</a>
454
-
455
- </p>
456
- <div id="method-i-inspect_source" class="dyn-source">
457
- <pre><span class="ruby-comment"># File lib/nanook.rb, line 52</span>
458
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">inspect</span> <span class="ruby-comment"># :nodoc</span>
459
- <span class="ruby-node">&quot;#{self.class.name}(rpc: #{@rpc.inspect}, object_id: \&quot;#{&quot;0x00%x&quot; % (object_id &lt;&lt; 1)}\&quot;)&quot;</span>
460
- <span class="ruby-keyword">end</span></pre>
461
- </div>
462
- </div>
463
-
464
- </div>
465
-
466
- <div class="method">
467
- <div class="title method-title" id="method-i-key">
468
-
469
- <b>key</b>(key=nil)
470
-
471
- <a href="../classes/Nanook.html#method-i-key" name="method-i-key" class="permalink">Link</a>
472
- </div>
473
-
474
-
475
- <div class="description">
476
-
477
- </div>
478
-
479
-
480
-
481
-
482
-
483
-
484
-
485
-
486
- <div class="sourcecode">
487
-
488
- <p class="source-link">
489
- Source:
490
- <a href="javascript:toggleSource('method-i-key_source')" id="l_method-i-key_source">show</a>
491
-
492
- </p>
493
- <div id="method-i-key_source" class="dyn-source">
494
- <pre><span class="ruby-comment"># File lib/nanook.rb, line 56</span>
495
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">key</span>(<span class="ruby-identifier">key</span>=<span class="ruby-keyword">nil</span>)
496
- <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Key</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-identifier">key</span>)
497
- <span class="ruby-keyword">end</span></pre>
498
- </div>
499
- </div>
500
-
501
- </div>
502
-
503
- <div class="method">
504
- <div class="title method-title" id="method-i-node">
505
-
506
- <b>node</b>()
507
-
508
- <a href="../classes/Nanook.html#method-i-node" name="method-i-node" class="permalink">Link</a>
509
- </div>
510
-
511
-
512
- <div class="description">
513
-
514
- </div>
515
-
516
-
517
-
518
-
519
-
520
-
521
-
522
-
523
- <div class="sourcecode">
524
-
525
- <p class="source-link">
526
- Source:
527
- <a href="javascript:toggleSource('method-i-node_source')" id="l_method-i-node_source">show</a>
528
-
529
- </p>
530
- <div id="method-i-node_source" class="dyn-source">
531
- <pre><span class="ruby-comment"># File lib/nanook.rb, line 60</span>
532
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">node</span>
533
- <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>)
534
- <span class="ruby-keyword">end</span></pre>
535
- </div>
536
- </div>
537
-
538
- </div>
539
-
540
- <div class="method">
541
- <div class="title method-title" id="method-i-wallet">
542
-
543
- <b>wallet</b>(wallet=nil)
544
-
545
- <a href="../classes/Nanook.html#method-i-wallet" name="method-i-wallet" class="permalink">Link</a>
546
- </div>
547
-
548
-
549
- <div class="description">
550
-
551
- </div>
552
-
553
-
554
-
555
-
556
-
557
-
558
-
559
-
560
- <div class="sourcecode">
561
-
562
- <p class="source-link">
563
- Source:
564
- <a href="javascript:toggleSource('method-i-wallet_source')" id="l_method-i-wallet_source">show</a>
565
-
566
- </p>
567
- <div id="method-i-wallet_source" class="dyn-source">
568
- <pre><span class="ruby-comment"># File lib/nanook.rb, line 64</span>
569
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">wallet</span>(<span class="ruby-identifier">wallet</span>=<span class="ruby-keyword">nil</span>)
570
- <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Wallet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-identifier">wallet</span>)
571
- <span class="ruby-keyword">end</span></pre>
572
- </div>
573
- </div>
574
-
575
- </div>
576
-
577
- <div class="method">
578
- <div class="title method-title" id="method-i-work_peers">
579
-
580
- <b>work_peers</b>()
581
-
582
- <a href="../classes/Nanook.html#method-i-work_peers" name="method-i-work_peers" class="permalink">Link</a>
583
- </div>
584
-
585
-
586
- <div class="description">
587
-
588
- </div>
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
- <div class="sourcecode">
598
-
599
- <p class="source-link">
600
- Source:
601
- <a href="javascript:toggleSource('method-i-work_peers_source')" id="l_method-i-work_peers_source">show</a>
602
-
603
- </p>
604
- <div id="method-i-work_peers_source" class="dyn-source">
605
- <pre><span class="ruby-comment"># File lib/nanook.rb, line 68</span>
606
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">work_peers</span>
607
- <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkPeer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>)
608
- <span class="ruby-keyword">end</span></pre>
609
- </div>
610
- </div>
611
-
612
- </div>
613
-
614
-
615
-
616
-
617
- </div>
618
-
619
- </div>
620
- </body>
621
- </html>