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,717 +0,0 @@
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, 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">&lt;
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(&quot;991CF19...&quot;)
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, &quot;991CF19...&quot;)
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-info">info</a>,
150
- </li>
151
-
152
-
153
- <li>
154
- <a href="#method-i-is_valid_work-3F">is_valid_work?</a>
155
- </li>
156
-
157
- </ul>
158
- </dd>
159
-
160
- <dt>N</dt>
161
- <dd>
162
- <ul>
163
-
164
-
165
- <li>
166
- <a href="#method-c-new">new</a>
167
- </li>
168
-
169
- </ul>
170
- </dd>
171
-
172
- <dt>P</dt>
173
- <dd>
174
- <ul>
175
-
176
-
177
- <li>
178
- <a href="#method-i-pending-3F">pending?</a>,
179
- </li>
180
-
181
-
182
- <li>
183
- <a href="#method-i-process">process</a>
184
- </li>
185
-
186
- </ul>
187
- </dd>
188
-
189
- <dt>R</dt>
190
- <dd>
191
- <ul>
192
-
193
-
194
- <li>
195
- <a href="#method-i-republish">republish</a>
196
- </li>
197
-
198
- </ul>
199
- </dd>
200
-
201
- <dt>S</dt>
202
- <dd>
203
- <ul>
204
-
205
-
206
- <li>
207
- <a href="#method-i-successors">successors</a>
208
- </li>
209
-
210
- </ul>
211
- </dd>
212
-
213
- </dl>
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
- <!-- Methods -->
233
-
234
- <div class="sectiontitle">Class Public methods</div>
235
-
236
- <div class="method">
237
- <div class="title method-title" id="method-c-new">
238
-
239
- <b>new</b>(rpc, block)
240
-
241
- <a href="../../classes/Nanook/Block.html#method-c-new" name="method-c-new" class="permalink">Link</a>
242
- </div>
243
-
244
-
245
- <div class="description">
246
-
247
- </div>
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
- <div class="sourcecode">
257
-
258
- <p class="source-link">
259
- Source:
260
- <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
261
-
262
- </p>
263
- <div id="method-c-new_source" class="dyn-source">
264
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 19</span>
265
- <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>)
266
- <span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
267
- <span class="ruby-ivar">@block</span> = <span class="ruby-identifier">block</span>
268
- <span class="ruby-identifier">block_required!</span> <span class="ruby-comment"># All methods expect a block</span>
269
- <span class="ruby-keyword">end</span></pre>
270
- </div>
271
- </div>
272
-
273
- </div>
274
-
275
-
276
-
277
- <div class="sectiontitle">Instance Public methods</div>
278
-
279
- <div class="method">
280
- <div class="title method-title" id="method-i-account">
281
-
282
- <b>account</b>()
283
-
284
- <a href="../../classes/Nanook/Block.html#method-i-account" name="method-i-account" class="permalink">Link</a>
285
- </div>
286
-
287
-
288
- <div class="description">
289
-
290
- </div>
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
- <div class="sourcecode">
300
-
301
- <p class="source-link">
302
- Source:
303
- <a href="javascript:toggleSource('method-i-account_source')" id="l_method-i-account_source">show</a>
304
-
305
- </p>
306
- <div id="method-i-account_source" class="dyn-source">
307
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 25</span>
308
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">account</span>
309
- <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>]
310
- <span class="ruby-keyword">end</span></pre>
311
- </div>
312
- </div>
313
-
314
- </div>
315
-
316
- <div class="method">
317
- <div class="title method-title" id="method-i-cancel_work">
318
-
319
- <b>cancel_work</b>()
320
-
321
- <a href="../../classes/Nanook/Block.html#method-i-cancel_work" name="method-i-cancel_work" class="permalink">Link</a>
322
- </div>
323
-
324
-
325
- <div class="description">
326
-
327
- </div>
328
-
329
-
330
-
331
-
332
-
333
-
334
-
335
-
336
- <div class="sourcecode">
337
-
338
- <p class="source-link">
339
- Source:
340
- <a href="javascript:toggleSource('method-i-cancel_work_source')" id="l_method-i-cancel_work_source">show</a>
341
-
342
- </p>
343
- <div id="method-i-cancel_work_source" class="dyn-source">
344
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 29</span>
345
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cancel_work</span>
346
- <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>
347
- <span class="ruby-keyword">end</span></pre>
348
- </div>
349
- </div>
350
-
351
- </div>
352
-
353
- <div class="method">
354
- <div class="title method-title" id="method-i-chain">
355
-
356
- <b>chain</b>(limit: 1000)
357
-
358
- <a href="../../classes/Nanook/Block.html#method-i-chain" name="method-i-chain" class="permalink">Link</a>
359
- </div>
360
-
361
-
362
- <div class="description">
363
-
364
- </div>
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
- <div class="sourcecode">
374
-
375
- <p class="source-link">
376
- Source:
377
- <a href="javascript:toggleSource('method-i-chain_source')" id="l_method-i-chain_source">show</a>
378
-
379
- </p>
380
- <div id="method-i-chain_source" class="dyn-source">
381
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 33</span>
382
- <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>)
383
- <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>]
384
- <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>)
385
- <span class="ruby-keyword">end</span></pre>
386
- </div>
387
- </div>
388
-
389
- </div>
390
-
391
- <div class="method">
392
- <div class="title method-title" id="method-i-generate_work">
393
-
394
- <b>generate_work</b>()
395
-
396
- <a href="../../classes/Nanook/Block.html#method-i-generate_work" name="method-i-generate_work" class="permalink">Link</a>
397
- </div>
398
-
399
-
400
- <div class="description">
401
-
402
- </div>
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
- <div class="sourcecode">
412
-
413
- <p class="source-link">
414
- Source:
415
- <a href="javascript:toggleSource('method-i-generate_work_source')" id="l_method-i-generate_work_source">show</a>
416
-
417
- </p>
418
- <div id="method-i-generate_work_source" class="dyn-source">
419
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 38</span>
420
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">generate_work</span>
421
- <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>]
422
- <span class="ruby-keyword">end</span></pre>
423
- </div>
424
- </div>
425
-
426
- </div>
427
-
428
- <div class="method">
429
- <div class="title method-title" id="method-i-history">
430
-
431
- <b>history</b>(limit: 1000)
432
-
433
- <a href="../../classes/Nanook/Block.html#method-i-history" name="method-i-history" class="permalink">Link</a>
434
- </div>
435
-
436
-
437
- <div class="description">
438
-
439
- </div>
440
-
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
- <div class="sourcecode">
449
-
450
- <p class="source-link">
451
- Source:
452
- <a href="javascript:toggleSource('method-i-history_source')" id="l_method-i-history_source">show</a>
453
-
454
- </p>
455
- <div id="method-i-history_source" class="dyn-source">
456
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 42</span>
457
- <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>)
458
- <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>]
459
- <span class="ruby-keyword">end</span></pre>
460
- </div>
461
- </div>
462
-
463
- </div>
464
-
465
- <div class="method">
466
- <div class="title method-title" id="method-i-info">
467
-
468
- <b>info</b>(allow_unchecked: false)
469
-
470
- <a href="../../classes/Nanook/Block.html#method-i-info" name="method-i-info" class="permalink">Link</a>
471
- </div>
472
-
473
-
474
- <div class="description">
475
-
476
- </div>
477
-
478
-
479
-
480
-
481
-
482
-
483
-
484
-
485
- <div class="sourcecode">
486
-
487
- <p class="source-link">
488
- Source:
489
- <a href="javascript:toggleSource('method-i-info_source')" id="l_method-i-info_source">show</a>
490
-
491
- </p>
492
- <div id="method-i-info_source" class="dyn-source">
493
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 46</span>
494
- <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>)
495
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">allow_unchecked</span>
496
- <span class="ruby-comment"># TODO not actually sure what this response looks like when it&#39;s not an unchecked block, assuming its blank</span>
497
- <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>)
498
- <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">&quot;Block not found&quot;</span>
499
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">_parse_info_response</span>(<span class="ruby-identifier">response</span> )
500
- <span class="ruby-keyword">end</span>
501
- <span class="ruby-comment"># Continue on falling backto checked block</span>
502
- <span class="ruby-keyword">end</span>
503
-
504
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:block</span>, <span class="ruby-value">:hash</span>)
505
- <span class="ruby-identifier">_parse_info_response</span>(<span class="ruby-identifier">response</span>)
506
- <span class="ruby-keyword">end</span></pre>
507
- </div>
508
- </div>
509
-
510
- </div>
511
-
512
- <div class="method">
513
- <div class="title method-title" id="method-i-is_valid_work-3F">
514
-
515
- <b>is_valid_work?</b>(work)
516
-
517
- <a href="../../classes/Nanook/Block.html#method-i-is_valid_work-3F" name="method-i-is_valid_work-3F" class="permalink">Link</a>
518
- </div>
519
-
520
-
521
- <div class="description">
522
-
523
- </div>
524
-
525
-
526
-
527
-
528
-
529
-
530
-
531
-
532
- <div class="sourcecode">
533
-
534
- <p class="source-link">
535
- Source:
536
- <a href="javascript:toggleSource('method-i-is_valid_work-3F_source')" id="l_method-i-is_valid_work-3F_source">show</a>
537
-
538
- </p>
539
- <div id="method-i-is_valid_work-3F_source" class="dyn-source">
540
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 60</span>
541
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_valid_work?</span>(<span class="ruby-identifier">work</span>)
542
- <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>)
543
- <span class="ruby-operator">!</span><span class="ruby-identifier">response</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">response</span>[<span class="ruby-value">:valid</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
544
- <span class="ruby-keyword">end</span></pre>
545
- </div>
546
- </div>
547
-
548
- </div>
549
-
550
- <div class="method">
551
- <div class="title method-title" id="method-i-pending-3F">
552
-
553
- <b>pending?</b>()
554
-
555
- <a href="../../classes/Nanook/Block.html#method-i-pending-3F" name="method-i-pending-3F" class="permalink">Link</a>
556
- </div>
557
-
558
-
559
- <div class="description">
560
-
561
- </div>
562
-
563
-
564
-
565
-
566
-
567
-
568
-
569
-
570
- <div class="sourcecode">
571
-
572
- <p class="source-link">
573
- Source:
574
- <a href="javascript:toggleSource('method-i-pending-3F_source')" id="l_method-i-pending-3F_source">show</a>
575
-
576
- </p>
577
- <div id="method-i-pending-3F_source" class="dyn-source">
578
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 79</span>
579
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">pending?</span>
580
- <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>)
581
- <span class="ruby-operator">!</span><span class="ruby-identifier">response</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">response</span>[<span class="ruby-value">:exists</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
582
- <span class="ruby-keyword">end</span></pre>
583
- </div>
584
- </div>
585
-
586
- </div>
587
-
588
- <div class="method">
589
- <div class="title method-title" id="method-i-process">
590
-
591
- <b>process</b>()
592
-
593
- <a href="../../classes/Nanook/Block.html#method-i-process" name="method-i-process" class="permalink">Link</a>
594
- </div>
595
-
596
-
597
- <div class="description">
598
-
599
- </div>
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
- <div class="sourcecode">
609
-
610
- <p class="source-link">
611
- Source:
612
- <a href="javascript:toggleSource('method-i-process_source')" id="l_method-i-process_source">show</a>
613
-
614
- </p>
615
- <div id="method-i-process_source" class="dyn-source">
616
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 84</span>
617
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">process</span>
618
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:process</span>, <span class="ruby-value">:block</span>)[<span class="ruby-value">:hash</span>]
619
- <span class="ruby-keyword">end</span></pre>
620
- </div>
621
- </div>
622
-
623
- </div>
624
-
625
- <div class="method">
626
- <div class="title method-title" id="method-i-republish">
627
-
628
- <b>republish</b>(destinations:nil, sources:nil)
629
-
630
- <a href="../../classes/Nanook/Block.html#method-i-republish" name="method-i-republish" class="permalink">Link</a>
631
- </div>
632
-
633
-
634
- <div class="description">
635
-
636
- </div>
637
-
638
-
639
-
640
-
641
-
642
-
643
-
644
-
645
- <div class="sourcecode">
646
-
647
- <p class="source-link">
648
- Source:
649
- <a href="javascript:toggleSource('method-i-republish_source')" id="l_method-i-republish_source">show</a>
650
-
651
- </p>
652
- <div id="method-i-republish_source" class="dyn-source">
653
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 65</span>
654
- <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>)
655
- <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">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">sources</span>.<span class="ruby-identifier">nil?</span>
656
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;You must provide either destinations or sources but not both&quot;</span>)
657
- <span class="ruby-keyword">end</span>
658
-
659
- <span class="ruby-comment"># Add in optional arguments</span>
660
- <span class="ruby-identifier">params</span> = {}
661
- <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>
662
- <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>
663
- <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>
664
-
665
- <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>]
666
- <span class="ruby-keyword">end</span></pre>
667
- </div>
668
- </div>
669
-
670
- </div>
671
-
672
- <div class="method">
673
- <div class="title method-title" id="method-i-successors">
674
-
675
- <b>successors</b>(limit: 1000)
676
-
677
- <a href="../../classes/Nanook/Block.html#method-i-successors" name="method-i-successors" class="permalink">Link</a>
678
- </div>
679
-
680
-
681
- <div class="description">
682
-
683
- </div>
684
-
685
-
686
-
687
-
688
-
689
-
690
-
691
-
692
- <div class="sourcecode">
693
-
694
- <p class="source-link">
695
- Source:
696
- <a href="javascript:toggleSource('method-i-successors_source')" id="l_method-i-successors_source">show</a>
697
-
698
- </p>
699
- <div id="method-i-successors_source" class="dyn-source">
700
- <pre><span class="ruby-comment"># File lib/nanook/block.rb, line 88</span>
701
- <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>)
702
- <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>]
703
- <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>)
704
- <span class="ruby-keyword">end</span></pre>
705
- </div>
706
- </div>
707
-
708
- </div>
709
-
710
-
711
-
712
-
713
- </div>
714
-
715
- </div>
716
- </body>
717
- </html>