nanook 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,759 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>Nanook::Block</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::Block">
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<meta name="description" content="The Nanook::Block class contains methods to discover publicly-available information about blocks on the nano network.">
|
|
19
|
+
<meta property="og:description" content="The Nanook::Block class contains methods to discover publicly-available information about blocks on the nano network.">
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<meta name="keywords" content="Nanook::Block class">
|
|
23
|
+
|
|
24
|
+
<meta name="keywords" content="new, account, cancel_work, chain, generate_work, history, id, info, is_valid_work?, republish, pending?, process, successors">
|
|
25
|
+
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
<body>
|
|
29
|
+
<div class="banner">
|
|
30
|
+
|
|
31
|
+
<h1>
|
|
32
|
+
<span class="type">Class</span>
|
|
33
|
+
Nanook::Block
|
|
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/block_rb.html">lib/nanook/block.rb</a></li>
|
|
45
|
+
|
|
46
|
+
</ul>
|
|
47
|
+
</div>
|
|
48
|
+
<div id="bodyContent">
|
|
49
|
+
<div id="content">
|
|
50
|
+
|
|
51
|
+
<div class="description">
|
|
52
|
+
|
|
53
|
+
<p>The <code>Nanook::Block</code> class contains methods to discover
|
|
54
|
+
publicly-available information about blocks on the nano network.</p>
|
|
55
|
+
|
|
56
|
+
<p>A block is represented by a unique hash</p>
|
|
57
|
+
|
|
58
|
+
<p>Initialize this class through the convenient <a
|
|
59
|
+
href="../Nanook.html#method-i-block">Nanook#block</a> method:</p>
|
|
60
|
+
|
|
61
|
+
<pre><code>nanook = Nanook.new
|
|
62
|
+
account = nanook.block("991CF19...")
|
|
63
|
+
</code></pre>
|
|
64
|
+
|
|
65
|
+
<p>Or compose the longhand way like this:</p>
|
|
66
|
+
|
|
67
|
+
<pre><code>rpc_conn = Nanook::Rpc.new
|
|
68
|
+
block = Nanook::Block.new(rpc_conn, "991CF19...")
|
|
69
|
+
</code></pre>
|
|
70
|
+
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
<!-- Method ref -->
|
|
87
|
+
<div class="sectiontitle">Methods</div>
|
|
88
|
+
<dl class="methods">
|
|
89
|
+
|
|
90
|
+
<dt>A</dt>
|
|
91
|
+
<dd>
|
|
92
|
+
<ul>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<li>
|
|
96
|
+
<a href="#method-i-account">account</a>
|
|
97
|
+
</li>
|
|
98
|
+
|
|
99
|
+
</ul>
|
|
100
|
+
</dd>
|
|
101
|
+
|
|
102
|
+
<dt>C</dt>
|
|
103
|
+
<dd>
|
|
104
|
+
<ul>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<li>
|
|
108
|
+
<a href="#method-i-cancel_work">cancel_work</a>,
|
|
109
|
+
</li>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
<li>
|
|
113
|
+
<a href="#method-i-chain">chain</a>
|
|
114
|
+
</li>
|
|
115
|
+
|
|
116
|
+
</ul>
|
|
117
|
+
</dd>
|
|
118
|
+
|
|
119
|
+
<dt>G</dt>
|
|
120
|
+
<dd>
|
|
121
|
+
<ul>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
<li>
|
|
125
|
+
<a href="#method-i-generate_work">generate_work</a>
|
|
126
|
+
</li>
|
|
127
|
+
|
|
128
|
+
</ul>
|
|
129
|
+
</dd>
|
|
130
|
+
|
|
131
|
+
<dt>H</dt>
|
|
132
|
+
<dd>
|
|
133
|
+
<ul>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
<li>
|
|
137
|
+
<a href="#method-i-history">history</a>
|
|
138
|
+
</li>
|
|
139
|
+
|
|
140
|
+
</ul>
|
|
141
|
+
</dd>
|
|
142
|
+
|
|
143
|
+
<dt>I</dt>
|
|
144
|
+
<dd>
|
|
145
|
+
<ul>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<li>
|
|
149
|
+
<a href="#method-i-id">id</a>,
|
|
150
|
+
</li>
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
<li>
|
|
154
|
+
<a href="#method-i-info">info</a>,
|
|
155
|
+
</li>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
<li>
|
|
159
|
+
<a href="#method-i-is_valid_work-3F">is_valid_work?</a>
|
|
160
|
+
</li>
|
|
161
|
+
|
|
162
|
+
</ul>
|
|
163
|
+
</dd>
|
|
164
|
+
|
|
165
|
+
<dt>N</dt>
|
|
166
|
+
<dd>
|
|
167
|
+
<ul>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
<li>
|
|
171
|
+
<a href="#method-c-new">new</a>
|
|
172
|
+
</li>
|
|
173
|
+
|
|
174
|
+
</ul>
|
|
175
|
+
</dd>
|
|
176
|
+
|
|
177
|
+
<dt>P</dt>
|
|
178
|
+
<dd>
|
|
179
|
+
<ul>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<li>
|
|
183
|
+
<a href="#method-i-pending-3F">pending?</a>,
|
|
184
|
+
</li>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<li>
|
|
188
|
+
<a href="#method-i-process">process</a>
|
|
189
|
+
</li>
|
|
190
|
+
|
|
191
|
+
</ul>
|
|
192
|
+
</dd>
|
|
193
|
+
|
|
194
|
+
<dt>R</dt>
|
|
195
|
+
<dd>
|
|
196
|
+
<ul>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
<li>
|
|
200
|
+
<a href="#method-i-republish">republish</a>
|
|
201
|
+
</li>
|
|
202
|
+
|
|
203
|
+
</ul>
|
|
204
|
+
</dd>
|
|
205
|
+
|
|
206
|
+
<dt>S</dt>
|
|
207
|
+
<dd>
|
|
208
|
+
<ul>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<li>
|
|
212
|
+
<a href="#method-i-successors">successors</a>
|
|
213
|
+
</li>
|
|
214
|
+
|
|
215
|
+
</ul>
|
|
216
|
+
</dd>
|
|
217
|
+
|
|
218
|
+
</dl>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
<!-- Methods -->
|
|
238
|
+
|
|
239
|
+
<div class="sectiontitle">Class Public methods</div>
|
|
240
|
+
|
|
241
|
+
<div class="method">
|
|
242
|
+
<div class="title method-title" id="method-c-new">
|
|
243
|
+
|
|
244
|
+
<b>new</b>(rpc, block)
|
|
245
|
+
|
|
246
|
+
<a href="../../classes/Nanook/Block.html#method-c-new" name="method-c-new" class="permalink">Link</a>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
<div class="description">
|
|
251
|
+
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<div class="sourcecode">
|
|
262
|
+
|
|
263
|
+
<p class="source-link">
|
|
264
|
+
Source:
|
|
265
|
+
<a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
|
|
266
|
+
|
|
267
|
+
</p>
|
|
268
|
+
<div id="method-c-new_source" class="dyn-source">
|
|
269
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 19</span>
|
|
270
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">rpc</span>, <span class="ruby-identifier">block</span>)
|
|
271
|
+
<span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
|
|
272
|
+
<span class="ruby-ivar">@block</span> = <span class="ruby-identifier">block</span>
|
|
273
|
+
<span class="ruby-identifier">block_required!</span> <span class="ruby-comment"># All methods expect a block</span>
|
|
274
|
+
<span class="ruby-keyword">end</span></pre>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
<div class="sectiontitle">Instance Public methods</div>
|
|
283
|
+
|
|
284
|
+
<div class="method">
|
|
285
|
+
<div class="title method-title" id="method-i-account">
|
|
286
|
+
|
|
287
|
+
<b>account</b>()
|
|
288
|
+
|
|
289
|
+
<a href="../../classes/Nanook/Block.html#method-i-account" name="method-i-account" class="permalink">Link</a>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
<div class="description">
|
|
294
|
+
|
|
295
|
+
</div>
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
<div class="sourcecode">
|
|
305
|
+
|
|
306
|
+
<p class="source-link">
|
|
307
|
+
Source:
|
|
308
|
+
<a href="javascript:toggleSource('method-i-account_source')" id="l_method-i-account_source">show</a>
|
|
309
|
+
|
|
310
|
+
</p>
|
|
311
|
+
<div id="method-i-account_source" class="dyn-source">
|
|
312
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 25</span>
|
|
313
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">account</span>
|
|
314
|
+
<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:block_account</span>, <span class="ruby-value">:hash</span>)[<span class="ruby-value">:account</span>]
|
|
315
|
+
<span class="ruby-keyword">end</span></pre>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<div class="method">
|
|
322
|
+
<div class="title method-title" id="method-i-cancel_work">
|
|
323
|
+
|
|
324
|
+
<b>cancel_work</b>()
|
|
325
|
+
|
|
326
|
+
<a href="../../classes/Nanook/Block.html#method-i-cancel_work" name="method-i-cancel_work" class="permalink">Link</a>
|
|
327
|
+
</div>
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
<div class="description">
|
|
331
|
+
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
<div class="sourcecode">
|
|
342
|
+
|
|
343
|
+
<p class="source-link">
|
|
344
|
+
Source:
|
|
345
|
+
<a href="javascript:toggleSource('method-i-cancel_work_source')" id="l_method-i-cancel_work_source">show</a>
|
|
346
|
+
|
|
347
|
+
</p>
|
|
348
|
+
<div id="method-i-cancel_work_source" class="dyn-source">
|
|
349
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 29</span>
|
|
350
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cancel_work</span>
|
|
351
|
+
<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:work_cancel</span>, <span class="ruby-value">:hash</span>).<span class="ruby-identifier">empty?</span>
|
|
352
|
+
<span class="ruby-keyword">end</span></pre>
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
<div class="method">
|
|
359
|
+
<div class="title method-title" id="method-i-chain">
|
|
360
|
+
|
|
361
|
+
<b>chain</b>(limit: 1000)
|
|
362
|
+
|
|
363
|
+
<a href="../../classes/Nanook/Block.html#method-i-chain" name="method-i-chain" class="permalink">Link</a>
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
<div class="description">
|
|
368
|
+
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
<div class="sourcecode">
|
|
379
|
+
|
|
380
|
+
<p class="source-link">
|
|
381
|
+
Source:
|
|
382
|
+
<a href="javascript:toggleSource('method-i-chain_source')" id="l_method-i-chain_source">show</a>
|
|
383
|
+
|
|
384
|
+
</p>
|
|
385
|
+
<div id="method-i-chain_source" class="dyn-source">
|
|
386
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 33</span>
|
|
387
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">chain</span>(<span class="ruby-value">limit:</span> <span class="ruby-value">1000</span>)
|
|
388
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:chain</span>, <span class="ruby-value">:block</span>, <span class="ruby-value">count:</span> <span class="ruby-identifier">limit</span>)[<span class="ruby-value">:blocks</span>]
|
|
389
|
+
<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">coerce_empty_string_to_type</span>(<span class="ruby-identifier">response</span>, <span class="ruby-constant">Array</span>)
|
|
390
|
+
<span class="ruby-keyword">end</span></pre>
|
|
391
|
+
</div>
|
|
392
|
+
</div>
|
|
393
|
+
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
<div class="method">
|
|
397
|
+
<div class="title method-title" id="method-i-generate_work">
|
|
398
|
+
|
|
399
|
+
<b>generate_work</b>()
|
|
400
|
+
|
|
401
|
+
<a href="../../classes/Nanook/Block.html#method-i-generate_work" name="method-i-generate_work" class="permalink">Link</a>
|
|
402
|
+
</div>
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
<div class="description">
|
|
406
|
+
|
|
407
|
+
</div>
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
<div class="sourcecode">
|
|
417
|
+
|
|
418
|
+
<p class="source-link">
|
|
419
|
+
Source:
|
|
420
|
+
<a href="javascript:toggleSource('method-i-generate_work_source')" id="l_method-i-generate_work_source">show</a>
|
|
421
|
+
|
|
422
|
+
</p>
|
|
423
|
+
<div id="method-i-generate_work_source" class="dyn-source">
|
|
424
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 38</span>
|
|
425
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">generate_work</span>
|
|
426
|
+
<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:work_generate</span>, <span class="ruby-value">:hash</span>)[<span class="ruby-value">:work</span>]
|
|
427
|
+
<span class="ruby-keyword">end</span></pre>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
</div>
|
|
432
|
+
|
|
433
|
+
<div class="method">
|
|
434
|
+
<div class="title method-title" id="method-i-history">
|
|
435
|
+
|
|
436
|
+
<b>history</b>(limit: 1000)
|
|
437
|
+
|
|
438
|
+
<a href="../../classes/Nanook/Block.html#method-i-history" name="method-i-history" class="permalink">Link</a>
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
<div class="description">
|
|
443
|
+
|
|
444
|
+
</div>
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
<div class="sourcecode">
|
|
454
|
+
|
|
455
|
+
<p class="source-link">
|
|
456
|
+
Source:
|
|
457
|
+
<a href="javascript:toggleSource('method-i-history_source')" id="l_method-i-history_source">show</a>
|
|
458
|
+
|
|
459
|
+
</p>
|
|
460
|
+
<div id="method-i-history_source" class="dyn-source">
|
|
461
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 42</span>
|
|
462
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">history</span>(<span class="ruby-value">limit:</span> <span class="ruby-value">1000</span>)
|
|
463
|
+
<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:history</span>, <span class="ruby-value">:hash</span>, <span class="ruby-value">count:</span> <span class="ruby-identifier">limit</span>)[<span class="ruby-value">:history</span>]
|
|
464
|
+
<span class="ruby-keyword">end</span></pre>
|
|
465
|
+
</div>
|
|
466
|
+
</div>
|
|
467
|
+
|
|
468
|
+
</div>
|
|
469
|
+
|
|
470
|
+
<div class="method">
|
|
471
|
+
<div class="title method-title" id="method-i-id">
|
|
472
|
+
|
|
473
|
+
<b>id</b>()
|
|
474
|
+
|
|
475
|
+
<a href="../../classes/Nanook/Block.html#method-i-id" name="method-i-id" class="permalink">Link</a>
|
|
476
|
+
</div>
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
<div class="description">
|
|
480
|
+
|
|
481
|
+
</div>
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
<div class="sourcecode">
|
|
491
|
+
|
|
492
|
+
<p class="source-link">
|
|
493
|
+
Source:
|
|
494
|
+
<a href="javascript:toggleSource('method-i-id_source')" id="l_method-i-id_source">show</a>
|
|
495
|
+
|
|
496
|
+
</p>
|
|
497
|
+
<div id="method-i-id_source" class="dyn-source">
|
|
498
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 46</span>
|
|
499
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">id</span>
|
|
500
|
+
<span class="ruby-ivar">@block</span>
|
|
501
|
+
<span class="ruby-keyword">end</span></pre>
|
|
502
|
+
</div>
|
|
503
|
+
</div>
|
|
504
|
+
|
|
505
|
+
</div>
|
|
506
|
+
|
|
507
|
+
<div class="method">
|
|
508
|
+
<div class="title method-title" id="method-i-info">
|
|
509
|
+
|
|
510
|
+
<b>info</b>(allow_unchecked: false)
|
|
511
|
+
|
|
512
|
+
<a href="../../classes/Nanook/Block.html#method-i-info" name="method-i-info" class="permalink">Link</a>
|
|
513
|
+
</div>
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
<div class="description">
|
|
517
|
+
|
|
518
|
+
</div>
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
<div class="sourcecode">
|
|
528
|
+
|
|
529
|
+
<p class="source-link">
|
|
530
|
+
Source:
|
|
531
|
+
<a href="javascript:toggleSource('method-i-info_source')" id="l_method-i-info_source">show</a>
|
|
532
|
+
|
|
533
|
+
</p>
|
|
534
|
+
<div id="method-i-info_source" class="dyn-source">
|
|
535
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 50</span>
|
|
536
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">info</span>(<span class="ruby-value">allow_unchecked:</span> <span class="ruby-keyword">false</span>)
|
|
537
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">allow_unchecked</span>
|
|
538
|
+
<span class="ruby-comment"># TODO not actually sure what this response looks like when it's not an unchecked block, assuming its blank</span>
|
|
539
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:unchecked_get</span>, <span class="ruby-value">:hash</span>)
|
|
540
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">response</span>[<span class="ruby-value">:error</span>] <span class="ruby-operator">!=</span> <span class="ruby-string">"Block not found"</span>
|
|
541
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">_parse_info_response</span>(<span class="ruby-identifier">response</span> )
|
|
542
|
+
<span class="ruby-keyword">end</span>
|
|
543
|
+
<span class="ruby-comment"># Continue on falling backto checked block</span>
|
|
544
|
+
<span class="ruby-keyword">end</span>
|
|
545
|
+
|
|
546
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:block</span>, <span class="ruby-value">:hash</span>)
|
|
547
|
+
<span class="ruby-identifier">_parse_info_response</span>(<span class="ruby-identifier">response</span>)
|
|
548
|
+
<span class="ruby-keyword">end</span></pre>
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
|
|
552
|
+
</div>
|
|
553
|
+
|
|
554
|
+
<div class="method">
|
|
555
|
+
<div class="title method-title" id="method-i-is_valid_work-3F">
|
|
556
|
+
|
|
557
|
+
<b>is_valid_work?</b>(work)
|
|
558
|
+
|
|
559
|
+
<a href="../../classes/Nanook/Block.html#method-i-is_valid_work-3F" name="method-i-is_valid_work-3F" class="permalink">Link</a>
|
|
560
|
+
</div>
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
<div class="description">
|
|
564
|
+
|
|
565
|
+
</div>
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
<div class="sourcecode">
|
|
575
|
+
|
|
576
|
+
<p class="source-link">
|
|
577
|
+
Source:
|
|
578
|
+
<a href="javascript:toggleSource('method-i-is_valid_work-3F_source')" id="l_method-i-is_valid_work-3F_source">show</a>
|
|
579
|
+
|
|
580
|
+
</p>
|
|
581
|
+
<div id="method-i-is_valid_work-3F_source" class="dyn-source">
|
|
582
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 64</span>
|
|
583
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_valid_work?</span>(<span class="ruby-identifier">work</span>)
|
|
584
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:work_validate</span>, <span class="ruby-value">:hash</span>, <span class="ruby-value">work:</span> <span class="ruby-identifier">work</span>)
|
|
585
|
+
<span class="ruby-operator">!</span><span class="ruby-identifier">response</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">response</span>[<span class="ruby-value">:valid</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
|
586
|
+
<span class="ruby-keyword">end</span></pre>
|
|
587
|
+
</div>
|
|
588
|
+
</div>
|
|
589
|
+
|
|
590
|
+
</div>
|
|
591
|
+
|
|
592
|
+
<div class="method">
|
|
593
|
+
<div class="title method-title" id="method-i-pending-3F">
|
|
594
|
+
|
|
595
|
+
<b>pending?</b>()
|
|
596
|
+
|
|
597
|
+
<a href="../../classes/Nanook/Block.html#method-i-pending-3F" name="method-i-pending-3F" class="permalink">Link</a>
|
|
598
|
+
</div>
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
<div class="description">
|
|
602
|
+
|
|
603
|
+
</div>
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
<div class="sourcecode">
|
|
613
|
+
|
|
614
|
+
<p class="source-link">
|
|
615
|
+
Source:
|
|
616
|
+
<a href="javascript:toggleSource('method-i-pending-3F_source')" id="l_method-i-pending-3F_source">show</a>
|
|
617
|
+
|
|
618
|
+
</p>
|
|
619
|
+
<div id="method-i-pending-3F_source" class="dyn-source">
|
|
620
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 83</span>
|
|
621
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">pending?</span>
|
|
622
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:pending_exists</span>, <span class="ruby-value">:hash</span>)
|
|
623
|
+
<span class="ruby-operator">!</span><span class="ruby-identifier">response</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">response</span>[<span class="ruby-value">:exists</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
|
624
|
+
<span class="ruby-keyword">end</span></pre>
|
|
625
|
+
</div>
|
|
626
|
+
</div>
|
|
627
|
+
|
|
628
|
+
</div>
|
|
629
|
+
|
|
630
|
+
<div class="method">
|
|
631
|
+
<div class="title method-title" id="method-i-process">
|
|
632
|
+
|
|
633
|
+
<b>process</b>()
|
|
634
|
+
|
|
635
|
+
<a href="../../classes/Nanook/Block.html#method-i-process" name="method-i-process" class="permalink">Link</a>
|
|
636
|
+
</div>
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
<div class="description">
|
|
640
|
+
|
|
641
|
+
</div>
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
<div class="sourcecode">
|
|
651
|
+
|
|
652
|
+
<p class="source-link">
|
|
653
|
+
Source:
|
|
654
|
+
<a href="javascript:toggleSource('method-i-process_source')" id="l_method-i-process_source">show</a>
|
|
655
|
+
|
|
656
|
+
</p>
|
|
657
|
+
<div id="method-i-process_source" class="dyn-source">
|
|
658
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 88</span>
|
|
659
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">process</span>
|
|
660
|
+
<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:process</span>, <span class="ruby-value">:block</span>)[<span class="ruby-value">:hash</span>]
|
|
661
|
+
<span class="ruby-keyword">end</span></pre>
|
|
662
|
+
</div>
|
|
663
|
+
</div>
|
|
664
|
+
|
|
665
|
+
</div>
|
|
666
|
+
|
|
667
|
+
<div class="method">
|
|
668
|
+
<div class="title method-title" id="method-i-republish">
|
|
669
|
+
|
|
670
|
+
<b>republish</b>(destinations:nil, sources:nil)
|
|
671
|
+
|
|
672
|
+
<a href="../../classes/Nanook/Block.html#method-i-republish" name="method-i-republish" class="permalink">Link</a>
|
|
673
|
+
</div>
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
<div class="description">
|
|
677
|
+
|
|
678
|
+
</div>
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
<div class="sourcecode">
|
|
688
|
+
|
|
689
|
+
<p class="source-link">
|
|
690
|
+
Source:
|
|
691
|
+
<a href="javascript:toggleSource('method-i-republish_source')" id="l_method-i-republish_source">show</a>
|
|
692
|
+
|
|
693
|
+
</p>
|
|
694
|
+
<div id="method-i-republish_source" class="dyn-source">
|
|
695
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 69</span>
|
|
696
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">republish</span>(<span class="ruby-value">destinations:</span><span class="ruby-keyword">nil</span>, <span class="ruby-value">sources:</span><span class="ruby-keyword">nil</span>)
|
|
697
|
+
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">destinations</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">sources</span>.<span class="ruby-identifier">nil?</span>
|
|
698
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">"You must provide either destinations or sources but not both"</span>)
|
|
699
|
+
<span class="ruby-keyword">end</span>
|
|
700
|
+
|
|
701
|
+
<span class="ruby-comment"># Add in optional arguments</span>
|
|
702
|
+
<span class="ruby-identifier">params</span> = {}
|
|
703
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-value">:destinations</span>] = <span class="ruby-identifier">destinations</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">destinations</span>.<span class="ruby-identifier">nil?</span>
|
|
704
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-value">:sources</span>] = <span class="ruby-identifier">sources</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">nil?</span>
|
|
705
|
+
<span class="ruby-identifier">params</span>[<span class="ruby-value">:count</span>] = <span class="ruby-value">1</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">empty?</span>
|
|
706
|
+
|
|
707
|
+
<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:republish</span>, <span class="ruby-value">:hash</span>, <span class="ruby-identifier">params</span>)[<span class="ruby-value">:blocks</span>]
|
|
708
|
+
<span class="ruby-keyword">end</span></pre>
|
|
709
|
+
</div>
|
|
710
|
+
</div>
|
|
711
|
+
|
|
712
|
+
</div>
|
|
713
|
+
|
|
714
|
+
<div class="method">
|
|
715
|
+
<div class="title method-title" id="method-i-successors">
|
|
716
|
+
|
|
717
|
+
<b>successors</b>(limit: 1000)
|
|
718
|
+
|
|
719
|
+
<a href="../../classes/Nanook/Block.html#method-i-successors" name="method-i-successors" class="permalink">Link</a>
|
|
720
|
+
</div>
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
<div class="description">
|
|
724
|
+
|
|
725
|
+
</div>
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
<div class="sourcecode">
|
|
735
|
+
|
|
736
|
+
<p class="source-link">
|
|
737
|
+
Source:
|
|
738
|
+
<a href="javascript:toggleSource('method-i-successors_source')" id="l_method-i-successors_source">show</a>
|
|
739
|
+
|
|
740
|
+
</p>
|
|
741
|
+
<div id="method-i-successors_source" class="dyn-source">
|
|
742
|
+
<pre><span class="ruby-comment"># File lib/nanook/block.rb, line 92</span>
|
|
743
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">successors</span>(<span class="ruby-value">limit:</span> <span class="ruby-value">1000</span>)
|
|
744
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:successors</span>, <span class="ruby-value">:block</span>, <span class="ruby-value">count:</span> <span class="ruby-identifier">limit</span>)[<span class="ruby-value">:blocks</span>]
|
|
745
|
+
<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">coerce_empty_string_to_type</span>(<span class="ruby-identifier">response</span>, <span class="ruby-constant">Array</span>)
|
|
746
|
+
<span class="ruby-keyword">end</span></pre>
|
|
747
|
+
</div>
|
|
748
|
+
</div>
|
|
749
|
+
|
|
750
|
+
</div>
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
</div>
|
|
756
|
+
|
|
757
|
+
</div>
|
|
758
|
+
</body>
|
|
759
|
+
</html>
|