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,759 +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, 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">&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-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&#39;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">&quot;Block not found&quot;</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">&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>
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">&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>
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">&amp;&amp;</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">&quot;You must provide either destinations or sources but not both&quot;</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>