nanook 0.7.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CHANGELOG.md +26 -0
- data/Gemfile.lock +2 -2
- data/README.md +18 -7
- data/Rakefile +18 -0
- data/docs/0.7.0/apple-touch-icon.png +0 -0
- data/docs/0.7.0/classes/Nanook.html +572 -0
- data/docs/0.7.0/classes/Nanook/Account.html +909 -0
- data/docs/0.7.0/classes/Nanook/Block.html +717 -0
- data/docs/0.7.0/classes/Nanook/Error.html +84 -0
- data/docs/0.7.0/classes/Nanook/Key.html +253 -0
- data/docs/0.7.0/classes/Nanook/Node.html +657 -0
- data/docs/0.7.0/classes/Nanook/Rpc.html +247 -0
- data/docs/0.7.0/classes/Nanook/Util.html +197 -0
- data/docs/0.7.0/classes/Nanook/Wallet.html +986 -0
- data/docs/0.7.0/classes/Nanook/WalletAccount.html +446 -0
- data/docs/0.7.0/classes/Nanook/WorkPeer.html +294 -0
- data/docs/0.7.0/created.rid +14 -0
- data/docs/0.7.0/css/github.css +123 -0
- data/docs/0.7.0/css/main.css +374 -0
- data/docs/0.7.0/css/panel.css +360 -0
- data/docs/0.7.0/css/reset.css +48 -0
- data/docs/0.7.0/favicon.ico +0 -0
- data/docs/0.7.0/files/README_md.html +418 -0
- data/docs/0.7.0/files/lib/nanook/account_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/block_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/error_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/key_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/node_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/rpc_rb.html +99 -0
- data/docs/0.7.0/files/lib/nanook/util_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/version_rb.html +84 -0
- data/docs/0.7.0/files/lib/nanook/wallet_account_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/wallet_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/work_peer_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook_rb.html +94 -0
- data/docs/0.7.0/i/arrow-down.svg +8 -0
- data/docs/0.7.0/i/arrow-right.svg +8 -0
- data/docs/0.7.0/i/search.svg +12 -0
- data/docs/0.7.0/i/tree_bg.svg +8 -0
- data/docs/0.7.0/index.html +11 -0
- data/docs/0.7.0/js/highlight.pack.js +1 -0
- data/docs/0.7.0/js/jquery-1.3.2.min.js +19 -0
- data/docs/0.7.0/js/main.js +25 -0
- data/docs/0.7.0/js/navigation.js +142 -0
- data/docs/0.7.0/js/search_index.js +1 -0
- data/docs/0.7.0/js/searchdoc.js +465 -0
- data/docs/0.7.0/js/searcher.js +229 -0
- data/docs/0.7.0/panel/index.html +47 -0
- data/docs/0.7.0/panel/links.html +32 -0
- data/docs/0.7.0/panel/tree.js +1 -0
- data/docs/0.8.0/apple-touch-icon.png +0 -0
- data/docs/0.8.0/classes/Nanook.html +621 -0
- data/docs/0.8.0/classes/Nanook/Account.html +971 -0
- data/docs/0.8.0/classes/Nanook/Block.html +759 -0
- data/docs/0.8.0/classes/Nanook/Error.html +84 -0
- data/docs/0.8.0/classes/Nanook/Key.html +295 -0
- data/docs/0.8.0/classes/Nanook/Node.html +657 -0
- data/docs/0.8.0/classes/Nanook/Rpc.html +247 -0
- data/docs/0.8.0/classes/Nanook/Util.html +264 -0
- data/docs/0.8.0/classes/Nanook/Wallet.html +1056 -0
- data/docs/0.8.0/classes/Nanook/WalletAccount.html +582 -0
- data/docs/0.8.0/classes/Nanook/WorkPeer.html +294 -0
- data/docs/0.8.0/created.rid +14 -0
- data/docs/0.8.0/css/github.css +123 -0
- data/docs/0.8.0/css/main.css +374 -0
- data/docs/0.8.0/css/panel.css +360 -0
- data/docs/0.8.0/css/reset.css +48 -0
- data/docs/0.8.0/favicon.ico +0 -0
- data/docs/0.8.0/files/README_md.html +423 -0
- data/docs/0.8.0/files/lib/nanook/account_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/block_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/error_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/key_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/node_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/rpc_rb.html +99 -0
- data/docs/0.8.0/files/lib/nanook/util_rb.html +97 -0
- data/docs/0.8.0/files/lib/nanook/version_rb.html +84 -0
- data/docs/0.8.0/files/lib/nanook/wallet_account_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/wallet_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/work_peer_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook_rb.html +94 -0
- data/docs/0.8.0/i/arrow-down.svg +8 -0
- data/docs/0.8.0/i/arrow-right.svg +8 -0
- data/docs/0.8.0/i/search.svg +12 -0
- data/docs/0.8.0/i/tree_bg.svg +8 -0
- data/docs/0.8.0/index.html +11 -0
- data/docs/0.8.0/js/highlight.pack.js +1 -0
- data/docs/0.8.0/js/jquery-1.3.2.min.js +19 -0
- data/docs/0.8.0/js/main.js +25 -0
- data/docs/0.8.0/js/navigation.js +142 -0
- data/docs/0.8.0/js/search_index.js +1 -0
- data/docs/0.8.0/js/searchdoc.js +465 -0
- data/docs/0.8.0/js/searcher.js +229 -0
- data/docs/0.8.0/panel/index.html +47 -0
- data/docs/0.8.0/panel/links.html +32 -0
- data/docs/0.8.0/panel/tree.js +1 -0
- data/docs/1.0.0/apple-touch-icon.png +0 -0
- data/docs/1.0.0/classes/Nanook.html +621 -0
- data/docs/1.0.0/classes/Nanook/Account.html +971 -0
- data/docs/1.0.0/classes/Nanook/Block.html +759 -0
- data/docs/1.0.0/classes/Nanook/Error.html +84 -0
- data/docs/1.0.0/classes/Nanook/Key.html +295 -0
- data/docs/1.0.0/classes/Nanook/Node.html +657 -0
- data/docs/1.0.0/classes/Nanook/Rpc.html +247 -0
- data/docs/1.0.0/classes/Nanook/Util.html +264 -0
- data/docs/1.0.0/classes/Nanook/Wallet.html +1056 -0
- data/docs/1.0.0/classes/Nanook/WalletAccount.html +582 -0
- data/docs/1.0.0/classes/Nanook/WorkPeer.html +294 -0
- data/docs/1.0.0/created.rid +14 -0
- data/docs/1.0.0/css/github.css +123 -0
- data/docs/1.0.0/css/main.css +374 -0
- data/docs/1.0.0/css/panel.css +360 -0
- data/docs/1.0.0/css/reset.css +48 -0
- data/docs/1.0.0/favicon.ico +0 -0
- data/docs/1.0.0/files/README_md.html +423 -0
- data/docs/1.0.0/files/lib/nanook/account_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/block_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/error_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/key_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/node_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/rpc_rb.html +99 -0
- data/docs/1.0.0/files/lib/nanook/util_rb.html +97 -0
- data/docs/1.0.0/files/lib/nanook/version_rb.html +84 -0
- data/docs/1.0.0/files/lib/nanook/wallet_account_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/wallet_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/work_peer_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook_rb.html +94 -0
- data/docs/1.0.0/i/arrow-down.svg +8 -0
- data/docs/1.0.0/i/arrow-right.svg +8 -0
- data/docs/1.0.0/i/search.svg +12 -0
- data/docs/1.0.0/i/tree_bg.svg +8 -0
- data/docs/1.0.0/index.html +11 -0
- data/docs/1.0.0/js/highlight.pack.js +1 -0
- data/docs/1.0.0/js/jquery-1.3.2.min.js +19 -0
- data/docs/1.0.0/js/main.js +25 -0
- data/docs/1.0.0/js/navigation.js +142 -0
- data/docs/1.0.0/js/search_index.js +1 -0
- data/docs/1.0.0/js/searchdoc.js +465 -0
- data/docs/1.0.0/js/searcher.js +229 -0
- data/docs/1.0.0/panel/index.html +47 -0
- data/docs/1.0.0/panel/links.html +32 -0
- data/docs/1.0.0/panel/tree.js +1 -0
- data/docs/apple-touch-icon.png +0 -0
- data/docs/classes/Nanook.html +572 -0
- data/docs/classes/Nanook/Account.html +907 -0
- data/docs/classes/Nanook/Block.html +717 -0
- data/docs/classes/Nanook/Error.html +84 -0
- data/docs/classes/Nanook/Key.html +253 -0
- data/docs/classes/Nanook/Node.html +657 -0
- data/docs/classes/Nanook/Rpc.html +247 -0
- data/docs/classes/Nanook/Util.html +197 -0
- data/docs/classes/Nanook/Wallet.html +778 -0
- data/docs/classes/Nanook/WalletAccount.html +447 -0
- data/docs/classes/Nanook/WorkPeer.html +294 -0
- data/docs/created.rid +14 -0
- data/docs/css/github.css +123 -0
- data/docs/css/main.css +374 -0
- data/docs/css/panel.css +360 -0
- data/docs/css/reset.css +48 -0
- data/docs/favicon.ico +0 -0
- data/docs/files/README_md.html +408 -0
- data/docs/files/lib/nanook/account_rb.html +89 -0
- data/docs/files/lib/nanook/block_rb.html +89 -0
- data/docs/files/lib/nanook/error_rb.html +89 -0
- data/docs/files/lib/nanook/key_rb.html +89 -0
- data/docs/files/lib/nanook/node_rb.html +89 -0
- data/docs/files/lib/nanook/rpc_rb.html +99 -0
- data/docs/files/lib/nanook/util_rb.html +89 -0
- data/docs/files/lib/nanook/version_rb.html +84 -0
- data/docs/files/lib/nanook/wallet_account_rb.html +89 -0
- data/docs/files/lib/nanook/wallet_rb.html +89 -0
- data/docs/files/lib/nanook/work_peer_rb.html +89 -0
- data/docs/files/lib/nanook_rb.html +94 -0
- data/docs/i/arrow-down.svg +8 -0
- data/docs/i/arrow-right.svg +8 -0
- data/docs/i/search.svg +12 -0
- data/docs/i/tree_bg.svg +8 -0
- data/docs/index.html +11 -0
- data/docs/js/highlight.pack.js +1 -0
- data/docs/js/jquery-1.3.2.min.js +19 -0
- data/docs/js/main.js +25 -0
- data/docs/js/navigation.js +142 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/searchdoc.js +465 -0
- data/docs/js/searcher.js +229 -0
- data/docs/panel/index.html +47 -0
- data/docs/panel/links.html +32 -0
- data/docs/panel/tree.js +1 -0
- data/lib/nanook.rb +40 -4
- data/lib/nanook/account.rb +250 -8
- data/lib/nanook/block.rb +25 -2
- data/lib/nanook/key.rb +10 -2
- data/lib/nanook/node.rb +4 -0
- data/lib/nanook/rpc.rb +5 -1
- data/lib/nanook/util.rb +9 -1
- data/lib/nanook/version.rb +1 -1
- data/lib/nanook/wallet.rb +275 -14
- data/lib/nanook/wallet_account.rb +63 -11
- data/lib/nanook/work_peer.rb +4 -0
- metadata +188 -3
@@ -0,0 +1,229 @@
|
|
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
|
+
|
@@ -0,0 +1,47 @@
|
|
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>
|
@@ -0,0 +1,32 @@
|
|
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>
|
@@ -0,0 +1 @@
|
|
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",[]]]]]
|
Binary file
|
@@ -0,0 +1,572 @@
|
|
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, 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"><
|
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("http://ip6-localhost.com:7076")
|
87
|
+
</code></pre>
|
88
|
+
|
89
|
+
<p>To give a specific timeout value:</p>
|
90
|
+
|
91
|
+
<pre><code>Nanook.new(timeout: 600)
|
92
|
+
Nanook.new("http://ip6-localhost.com:7076", 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>K</dt>
|
195
|
+
<dd>
|
196
|
+
<ul>
|
197
|
+
|
198
|
+
|
199
|
+
<li>
|
200
|
+
<a href="#method-i-key">key</a>
|
201
|
+
</li>
|
202
|
+
|
203
|
+
</ul>
|
204
|
+
</dd>
|
205
|
+
|
206
|
+
<dt>N</dt>
|
207
|
+
<dd>
|
208
|
+
<ul>
|
209
|
+
|
210
|
+
|
211
|
+
<li>
|
212
|
+
<a href="#method-c-new">new</a>,
|
213
|
+
</li>
|
214
|
+
|
215
|
+
|
216
|
+
<li>
|
217
|
+
<a href="#method-i-node">node</a>
|
218
|
+
</li>
|
219
|
+
|
220
|
+
</ul>
|
221
|
+
</dd>
|
222
|
+
|
223
|
+
<dt>W</dt>
|
224
|
+
<dd>
|
225
|
+
<ul>
|
226
|
+
|
227
|
+
|
228
|
+
<li>
|
229
|
+
<a href="#method-i-wallet">wallet</a>,
|
230
|
+
</li>
|
231
|
+
|
232
|
+
|
233
|
+
<li>
|
234
|
+
<a href="#method-i-work_peers">work_peers</a>
|
235
|
+
</li>
|
236
|
+
|
237
|
+
</ul>
|
238
|
+
</dd>
|
239
|
+
|
240
|
+
</dl>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
<!-- Section constants -->
|
255
|
+
<div class="sectiontitle">Constants</div>
|
256
|
+
<table border='0' cellpadding='5'>
|
257
|
+
|
258
|
+
<tr valign='top'>
|
259
|
+
<td class="attr-name">VERSION</td>
|
260
|
+
<td>=</td>
|
261
|
+
<td class="attr-value">"0.7.0"</td>
|
262
|
+
</tr>
|
263
|
+
|
264
|
+
<tr valign='top'>
|
265
|
+
<td> </td>
|
266
|
+
<td colspan="2" class="attr-desc"></td>
|
267
|
+
</tr>
|
268
|
+
|
269
|
+
|
270
|
+
</table>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<!-- Methods -->
|
278
|
+
|
279
|
+
<div class="sectiontitle">Class Public methods</div>
|
280
|
+
|
281
|
+
<div class="method">
|
282
|
+
<div class="title method-title" id="method-c-new">
|
283
|
+
|
284
|
+
<b>new</b>(uri=Nanook::Rpc::DEFAULT_URI, timeout:Nanook::Rpc::DEFAULT_TIMEOUT)
|
285
|
+
|
286
|
+
<a href="../classes/Nanook.html#method-c-new" name="method-c-new" class="permalink">Link</a>
|
287
|
+
</div>
|
288
|
+
|
289
|
+
|
290
|
+
<div class="description">
|
291
|
+
<h4 id="method-c-new-label-Arguments">Arguments</h4>
|
292
|
+
<ul><li>
|
293
|
+
<p><code>uri</code> - RPC host to connect to (default is “<a
|
294
|
+
href="http://localhost:7076">localhost:7076</a>”)</p>
|
295
|
+
</li><li>
|
296
|
+
<p><code>timeout:</code> - Connection timeout in number of seconds (default is
|
297
|
+
500)</p>
|
298
|
+
</li></ul>
|
299
|
+
|
300
|
+
<h4 id="method-c-new-label-Examples">Examples</h4>
|
301
|
+
|
302
|
+
<pre><code>Nanook.new # Connect to http://localhost:7076 with 500s timeout
|
303
|
+
|
304
|
+
Nanook.new(timeout: 600)
|
305
|
+
Nanook.new("http://ip6-localhost.com:7076", timeout: 600)
|
306
|
+
</code></pre>
|
307
|
+
</div>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
<div class="sourcecode">
|
317
|
+
|
318
|
+
<p class="source-link">
|
319
|
+
Source:
|
320
|
+
<a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
|
321
|
+
|
322
|
+
</p>
|
323
|
+
<div id="method-c-new_source" class="dyn-source">
|
324
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 33</span>
|
325
|
+
<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>)
|
326
|
+
<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>)
|
327
|
+
<span class="ruby-keyword">end</span></pre>
|
328
|
+
</div>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
</div>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
<div class="sectiontitle">Instance Public methods</div>
|
336
|
+
|
337
|
+
<div class="method">
|
338
|
+
<div class="title method-title" id="method-i-account">
|
339
|
+
|
340
|
+
<b>account</b>(account=nil)
|
341
|
+
|
342
|
+
<a href="../classes/Nanook.html#method-i-account" name="method-i-account" class="permalink">Link</a>
|
343
|
+
</div>
|
344
|
+
|
345
|
+
|
346
|
+
<div class="description">
|
347
|
+
<p>Returns a <a href="Nanook/Account.html">Nanook::Account</a> instance.</p>
|
348
|
+
|
349
|
+
<pre><code>nanook = Nanook.new
|
350
|
+
|
351
|
+
account = nanook.account
|
352
|
+
account = nanook.account("xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000")
|
353
|
+
</code></pre>
|
354
|
+
</div>
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
<div class="sourcecode">
|
364
|
+
|
365
|
+
<p class="source-link">
|
366
|
+
Source:
|
367
|
+
<a href="javascript:toggleSource('method-i-account_source')" id="l_method-i-account_source">show</a>
|
368
|
+
|
369
|
+
</p>
|
370
|
+
<div id="method-i-account_source" class="dyn-source">
|
371
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 44</span>
|
372
|
+
<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>)
|
373
|
+
<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>)
|
374
|
+
<span class="ruby-keyword">end</span></pre>
|
375
|
+
</div>
|
376
|
+
</div>
|
377
|
+
|
378
|
+
</div>
|
379
|
+
|
380
|
+
<div class="method">
|
381
|
+
<div class="title method-title" id="method-i-block">
|
382
|
+
|
383
|
+
<b>block</b>(block=nil)
|
384
|
+
|
385
|
+
<a href="../classes/Nanook.html#method-i-block" name="method-i-block" class="permalink">Link</a>
|
386
|
+
</div>
|
387
|
+
|
388
|
+
|
389
|
+
<div class="description">
|
390
|
+
|
391
|
+
</div>
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
<div class="sourcecode">
|
401
|
+
|
402
|
+
<p class="source-link">
|
403
|
+
Source:
|
404
|
+
<a href="javascript:toggleSource('method-i-block_source')" id="l_method-i-block_source">show</a>
|
405
|
+
|
406
|
+
</p>
|
407
|
+
<div id="method-i-block_source" class="dyn-source">
|
408
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 48</span>
|
409
|
+
<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>)
|
410
|
+
<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>)
|
411
|
+
<span class="ruby-keyword">end</span></pre>
|
412
|
+
</div>
|
413
|
+
</div>
|
414
|
+
|
415
|
+
</div>
|
416
|
+
|
417
|
+
<div class="method">
|
418
|
+
<div class="title method-title" id="method-i-key">
|
419
|
+
|
420
|
+
<b>key</b>(key=nil)
|
421
|
+
|
422
|
+
<a href="../classes/Nanook.html#method-i-key" name="method-i-key" class="permalink">Link</a>
|
423
|
+
</div>
|
424
|
+
|
425
|
+
|
426
|
+
<div class="description">
|
427
|
+
|
428
|
+
</div>
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
<div class="sourcecode">
|
438
|
+
|
439
|
+
<p class="source-link">
|
440
|
+
Source:
|
441
|
+
<a href="javascript:toggleSource('method-i-key_source')" id="l_method-i-key_source">show</a>
|
442
|
+
|
443
|
+
</p>
|
444
|
+
<div id="method-i-key_source" class="dyn-source">
|
445
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 52</span>
|
446
|
+
<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>)
|
447
|
+
<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>)
|
448
|
+
<span class="ruby-keyword">end</span></pre>
|
449
|
+
</div>
|
450
|
+
</div>
|
451
|
+
|
452
|
+
</div>
|
453
|
+
|
454
|
+
<div class="method">
|
455
|
+
<div class="title method-title" id="method-i-node">
|
456
|
+
|
457
|
+
<b>node</b>()
|
458
|
+
|
459
|
+
<a href="../classes/Nanook.html#method-i-node" name="method-i-node" class="permalink">Link</a>
|
460
|
+
</div>
|
461
|
+
|
462
|
+
|
463
|
+
<div class="description">
|
464
|
+
|
465
|
+
</div>
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
<div class="sourcecode">
|
475
|
+
|
476
|
+
<p class="source-link">
|
477
|
+
Source:
|
478
|
+
<a href="javascript:toggleSource('method-i-node_source')" id="l_method-i-node_source">show</a>
|
479
|
+
|
480
|
+
</p>
|
481
|
+
<div id="method-i-node_source" class="dyn-source">
|
482
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 56</span>
|
483
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">node</span>
|
484
|
+
<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>)
|
485
|
+
<span class="ruby-keyword">end</span></pre>
|
486
|
+
</div>
|
487
|
+
</div>
|
488
|
+
|
489
|
+
</div>
|
490
|
+
|
491
|
+
<div class="method">
|
492
|
+
<div class="title method-title" id="method-i-wallet">
|
493
|
+
|
494
|
+
<b>wallet</b>(wallet=nil)
|
495
|
+
|
496
|
+
<a href="../classes/Nanook.html#method-i-wallet" name="method-i-wallet" class="permalink">Link</a>
|
497
|
+
</div>
|
498
|
+
|
499
|
+
|
500
|
+
<div class="description">
|
501
|
+
|
502
|
+
</div>
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
<div class="sourcecode">
|
512
|
+
|
513
|
+
<p class="source-link">
|
514
|
+
Source:
|
515
|
+
<a href="javascript:toggleSource('method-i-wallet_source')" id="l_method-i-wallet_source">show</a>
|
516
|
+
|
517
|
+
</p>
|
518
|
+
<div id="method-i-wallet_source" class="dyn-source">
|
519
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 60</span>
|
520
|
+
<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>)
|
521
|
+
<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>)
|
522
|
+
<span class="ruby-keyword">end</span></pre>
|
523
|
+
</div>
|
524
|
+
</div>
|
525
|
+
|
526
|
+
</div>
|
527
|
+
|
528
|
+
<div class="method">
|
529
|
+
<div class="title method-title" id="method-i-work_peers">
|
530
|
+
|
531
|
+
<b>work_peers</b>()
|
532
|
+
|
533
|
+
<a href="../classes/Nanook.html#method-i-work_peers" name="method-i-work_peers" class="permalink">Link</a>
|
534
|
+
</div>
|
535
|
+
|
536
|
+
|
537
|
+
<div class="description">
|
538
|
+
|
539
|
+
</div>
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
<div class="sourcecode">
|
549
|
+
|
550
|
+
<p class="source-link">
|
551
|
+
Source:
|
552
|
+
<a href="javascript:toggleSource('method-i-work_peers_source')" id="l_method-i-work_peers_source">show</a>
|
553
|
+
|
554
|
+
</p>
|
555
|
+
<div id="method-i-work_peers_source" class="dyn-source">
|
556
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 64</span>
|
557
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">work_peers</span>
|
558
|
+
<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>)
|
559
|
+
<span class="ruby-keyword">end</span></pre>
|
560
|
+
</div>
|
561
|
+
</div>
|
562
|
+
|
563
|
+
</div>
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
|
568
|
+
</div>
|
569
|
+
|
570
|
+
</div>
|
571
|
+
</body>
|
572
|
+
</html>
|