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,447 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook::WalletAccount</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::WalletAccount">
15
-
16
-
17
-
18
- <meta name="keywords" content="Nanook::WalletAccount class">
19
-
20
- <meta name="keywords" content="new, create, destroy, pay, receive, method_missing">
21
-
22
- </head>
23
-
24
- <body>
25
- <div class="banner">
26
-
27
- <h1>
28
- <span class="type">Class</span>
29
- Nanook::WalletAccount
30
-
31
- <span class="parent">&lt;
32
-
33
- Object
34
-
35
- </span>
36
-
37
- </h1>
38
- <ul class="files">
39
-
40
- <li><a href="../../files/lib/nanook/wallet_account_rb.html">lib/nanook/wallet_account.rb</a></li>
41
-
42
- </ul>
43
- </div>
44
- <div id="bodyContent">
45
- <div id="content">
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
- <!-- Method ref -->
61
- <div class="sectiontitle">Methods</div>
62
- <dl class="methods">
63
-
64
- <dt>C</dt>
65
- <dd>
66
- <ul>
67
-
68
-
69
- <li>
70
- <a href="#method-i-create">create</a>
71
- </li>
72
-
73
- </ul>
74
- </dd>
75
-
76
- <dt>D</dt>
77
- <dd>
78
- <ul>
79
-
80
-
81
- <li>
82
- <a href="#method-i-destroy">destroy</a>
83
- </li>
84
-
85
- </ul>
86
- </dd>
87
-
88
- <dt>M</dt>
89
- <dd>
90
- <ul>
91
-
92
-
93
- <li>
94
- <a href="#method-i-method_missing">method_missing</a>
95
- </li>
96
-
97
- </ul>
98
- </dd>
99
-
100
- <dt>N</dt>
101
- <dd>
102
- <ul>
103
-
104
-
105
- <li>
106
- <a href="#method-c-new">new</a>
107
- </li>
108
-
109
- </ul>
110
- </dd>
111
-
112
- <dt>P</dt>
113
- <dd>
114
- <ul>
115
-
116
-
117
- <li>
118
- <a href="#method-i-pay">pay</a>
119
- </li>
120
-
121
- </ul>
122
- </dd>
123
-
124
- <dt>R</dt>
125
- <dd>
126
- <ul>
127
-
128
-
129
- <li>
130
- <a href="#method-i-receive">receive</a>
131
- </li>
132
-
133
- </ul>
134
- </dd>
135
-
136
- </dl>
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
- <!-- Methods -->
156
-
157
- <div class="sectiontitle">Class Public methods</div>
158
-
159
- <div class="method">
160
- <div class="title method-title" id="method-c-new">
161
-
162
- <b>new</b>(rpc, wallet, account)
163
-
164
- <a href="../../classes/Nanook/WalletAccount.html#method-c-new" name="method-c-new" class="permalink">Link</a>
165
- </div>
166
-
167
-
168
- <div class="description">
169
-
170
- </div>
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
- <div class="sourcecode">
180
-
181
- <p class="source-link">
182
- Source:
183
- <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
184
-
185
- </p>
186
- <div id="method-c-new_source" class="dyn-source">
187
- <pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 4</span>
188
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">rpc</span>, <span class="ruby-identifier">wallet</span>, <span class="ruby-identifier">account</span>)
189
- <span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
190
- <span class="ruby-ivar">@wallet</span> = <span class="ruby-identifier">wallet</span>
191
- <span class="ruby-ivar">@account</span> = <span class="ruby-identifier">account</span>
192
-
193
- <span class="ruby-comment"># An object to delegate account methods that don&#39;t</span>
194
- <span class="ruby-comment"># expect a wallet param in the RPC call, to allow this</span>
195
- <span class="ruby-comment"># class to support all methods that can be called on Nanook::Account</span>
196
- <span class="ruby-ivar">@nanook_account_instance</span> = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Account</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-ivar">@account</span>)
197
-
198
- <span class="ruby-comment"># Wallet instance to call contains? on to check account</span>
199
- <span class="ruby-comment"># is in wallet</span>
200
- <span class="ruby-ivar">@nanook_wallet_instance</span> = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Wallet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-ivar">@wallet</span>)
201
-
202
- <span class="ruby-ivar">@known_valid_accounts</span> = []
203
- <span class="ruby-keyword">end</span></pre>
204
- </div>
205
- </div>
206
-
207
- </div>
208
-
209
-
210
-
211
- <div class="sectiontitle">Instance Public methods</div>
212
-
213
- <div class="method">
214
- <div class="title method-title" id="method-i-create">
215
-
216
- <b>create</b>()
217
-
218
- <a href="../../classes/Nanook/WalletAccount.html#method-i-create" name="method-i-create" class="permalink">Link</a>
219
- </div>
220
-
221
-
222
- <div class="description">
223
-
224
- </div>
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
- <div class="sourcecode">
234
-
235
- <p class="source-link">
236
- Source:
237
- <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a>
238
-
239
- </p>
240
- <div id="method-i-create_source" class="dyn-source">
241
- <pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 21</span>
242
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">create</span>
243
- <span class="ruby-identifier">wallet_required!</span>
244
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_create</span>)[<span class="ruby-value">:account</span>]
245
- <span class="ruby-keyword">end</span></pre>
246
- </div>
247
- </div>
248
-
249
- </div>
250
-
251
- <div class="method">
252
- <div class="title method-title" id="method-i-destroy">
253
-
254
- <b>destroy</b>()
255
-
256
- <a href="../../classes/Nanook/WalletAccount.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a>
257
- </div>
258
-
259
-
260
- <div class="description">
261
-
262
- </div>
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
- <div class="sourcecode">
272
-
273
- <p class="source-link">
274
- Source:
275
- <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a>
276
-
277
- </p>
278
- <div id="method-i-destroy_source" class="dyn-source">
279
- <pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 26</span>
280
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">destroy</span>
281
- <span class="ruby-identifier">wallet_required!</span>
282
- <span class="ruby-identifier">account_must_belong_to_wallet!</span>
283
- (<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_remove</span>)[<span class="ruby-value">:removed</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">success</span><span class="ruby-operator">|</span>
284
- <span class="ruby-ivar">@known_valid_accounts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-ivar">@account</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
285
- <span class="ruby-keyword">end</span>
286
- <span class="ruby-keyword">end</span></pre>
287
- </div>
288
- </div>
289
-
290
- </div>
291
-
292
- <div class="method">
293
- <div class="title method-title" id="method-i-method_missing">
294
-
295
- <b>method_missing</b>(m, *args, &amp;block)
296
-
297
- <a href="../../classes/Nanook/WalletAccount.html#method-i-method_missing" name="method-i-method_missing" class="permalink">Link</a>
298
- </div>
299
-
300
-
301
- <div class="description">
302
- <p>Any method of <a href="Account.html">Nanook::Account</a> can be called on
303
- this class too</p>
304
- </div>
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
- <div class="sourcecode">
314
-
315
- <p class="source-link">
316
- Source:
317
- <a href="javascript:toggleSource('method-i-method_missing_source')" id="l_method-i-method_missing_source">show</a>
318
-
319
- </p>
320
- <div id="method-i-method_missing_source" class="dyn-source">
321
- <pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 76</span>
322
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">method_missing</span>(<span class="ruby-identifier">m</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
323
- <span class="ruby-keyword">if</span> <span class="ruby-ivar">@nanook_account_instance</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">m</span>)
324
- <span class="ruby-ivar">@nanook_account_instance</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">m</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
325
- <span class="ruby-keyword">else</span>
326
- <span class="ruby-keyword">super</span>(<span class="ruby-identifier">m</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
327
- <span class="ruby-keyword">end</span>
328
- <span class="ruby-keyword">end</span></pre>
329
- </div>
330
- </div>
331
-
332
- </div>
333
-
334
- <div class="method">
335
- <div class="title method-title" id="method-i-pay">
336
-
337
- <b>pay</b>(to:, amount:, id:)
338
-
339
- <a href="../../classes/Nanook/WalletAccount.html#method-i-pay" name="method-i-pay" class="permalink">Link</a>
340
- </div>
341
-
342
-
343
- <div class="description">
344
-
345
- </div>
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
-
354
- <div class="sourcecode">
355
-
356
- <p class="source-link">
357
- Source:
358
- <a href="javascript:toggleSource('method-i-pay_source')" id="l_method-i-pay_source">show</a>
359
-
360
- </p>
361
- <div id="method-i-pay_source" class="dyn-source">
362
- <pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 34</span>
363
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">pay</span>(<span class="ruby-value">to:</span>, <span class="ruby-value">amount:</span>, <span class="ruby-value">id:</span>)
364
- <span class="ruby-identifier">wallet_required!</span>
365
- <span class="ruby-identifier">account_must_belong_to_wallet!</span>
366
-
367
- <span class="ruby-comment"># Check that to: account is valid</span>
368
- <span class="ruby-keyword">unless</span> <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Account</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-identifier">to</span>).<span class="ruby-identifier">exists?</span>
369
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;To account does not exist (#{to})&quot;</span>)
370
- <span class="ruby-keyword">end</span>
371
-
372
- <span class="ruby-identifier">raw</span> = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-constant">NANO_to_raw</span>(<span class="ruby-identifier">amount</span>)
373
-
374
- <span class="ruby-comment"># account is called source, so don&#39;t use the normal rpc method</span>
375
- <span class="ruby-identifier">p</span> = {
376
- <span class="ruby-value">wallet:</span> <span class="ruby-ivar">@wallet</span>,
377
- <span class="ruby-value">source:</span> <span class="ruby-ivar">@account</span>,
378
- <span class="ruby-value">destination:</span> <span class="ruby-identifier">to</span>,
379
- <span class="ruby-value">amount:</span> <span class="ruby-identifier">raw</span>,
380
- <span class="ruby-value">id:</span> <span class="ruby-identifier">id</span>
381
- }
382
-
383
- <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@rpc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-value">:send</span>, <span class="ruby-identifier">p</span>)
384
-
385
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">response</span>[<span class="ruby-value">:error</span>]
386
- <span class="ruby-identifier">response</span>
387
- <span class="ruby-keyword">else</span>
388
- <span class="ruby-identifier">response</span>[<span class="ruby-value">:block</span>]
389
- <span class="ruby-keyword">end</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-receive">
398
-
399
- <b>receive</b>(block=nil)
400
-
401
- <a href="../../classes/Nanook/WalletAccount.html#method-i-receive" name="method-i-receive" class="permalink">Link</a>
402
- </div>
403
-
404
-
405
- <div class="description">
406
- <p>Returns false if no block to receive</p>
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-receive_source')" id="l_method-i-receive_source">show</a>
421
-
422
- </p>
423
- <div id="method-i-receive_source" class="dyn-source">
424
- <pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 64</span>
425
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">receive</span>(<span class="ruby-identifier">block</span>=<span class="ruby-keyword">nil</span>)
426
- <span class="ruby-identifier">wallet_required!</span>
427
- <span class="ruby-identifier">account_must_belong_to_wallet!</span>
428
-
429
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">nil?</span>
430
- <span class="ruby-identifier">_receive_without_block</span>
431
- <span class="ruby-keyword">else</span>
432
- <span class="ruby-identifier">_receive_with_block</span>(<span class="ruby-identifier">block</span>)
433
- <span class="ruby-keyword">end</span>
434
- <span class="ruby-keyword">end</span></pre>
435
- </div>
436
- </div>
437
-
438
- </div>
439
-
440
-
441
-
442
-
443
- </div>
444
-
445
- </div>
446
- </body>
447
- </html>
@@ -1,294 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook::WorkPeer</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::WorkPeer">
15
-
16
-
17
-
18
- <meta name="keywords" content="Nanook::WorkPeer class">
19
-
20
- <meta name="keywords" content="new, add, clear, list">
21
-
22
- </head>
23
-
24
- <body>
25
- <div class="banner">
26
-
27
- <h1>
28
- <span class="type">Class</span>
29
- Nanook::WorkPeer
30
-
31
- <span class="parent">&lt;
32
-
33
- Object
34
-
35
- </span>
36
-
37
- </h1>
38
- <ul class="files">
39
-
40
- <li><a href="../../files/lib/nanook/work_peer_rb.html">lib/nanook/work_peer.rb</a></li>
41
-
42
- </ul>
43
- </div>
44
- <div id="bodyContent">
45
- <div id="content">
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
- <!-- Method ref -->
61
- <div class="sectiontitle">Methods</div>
62
- <dl class="methods">
63
-
64
- <dt>A</dt>
65
- <dd>
66
- <ul>
67
-
68
-
69
- <li>
70
- <a href="#method-i-add">add</a>
71
- </li>
72
-
73
- </ul>
74
- </dd>
75
-
76
- <dt>C</dt>
77
- <dd>
78
- <ul>
79
-
80
-
81
- <li>
82
- <a href="#method-i-clear">clear</a>
83
- </li>
84
-
85
- </ul>
86
- </dd>
87
-
88
- <dt>L</dt>
89
- <dd>
90
- <ul>
91
-
92
-
93
- <li>
94
- <a href="#method-i-list">list</a>
95
- </li>
96
-
97
- </ul>
98
- </dd>
99
-
100
- <dt>N</dt>
101
- <dd>
102
- <ul>
103
-
104
-
105
- <li>
106
- <a href="#method-c-new">new</a>
107
- </li>
108
-
109
- </ul>
110
- </dd>
111
-
112
- </dl>
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
- <!-- Methods -->
132
-
133
- <div class="sectiontitle">Class Public methods</div>
134
-
135
- <div class="method">
136
- <div class="title method-title" id="method-c-new">
137
-
138
- <b>new</b>(rpc)
139
-
140
- <a href="../../classes/Nanook/WorkPeer.html#method-c-new" name="method-c-new" class="permalink">Link</a>
141
- </div>
142
-
143
-
144
- <div class="description">
145
-
146
- </div>
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
- <div class="sourcecode">
156
-
157
- <p class="source-link">
158
- Source:
159
- <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
160
-
161
- </p>
162
- <div id="method-c-new_source" class="dyn-source">
163
- <pre><span class="ruby-comment"># File lib/nanook/work_peer.rb, line 4</span>
164
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">rpc</span>)
165
- <span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
166
- <span class="ruby-keyword">end</span></pre>
167
- </div>
168
- </div>
169
-
170
- </div>
171
-
172
-
173
-
174
- <div class="sectiontitle">Instance Public methods</div>
175
-
176
- <div class="method">
177
- <div class="title method-title" id="method-i-add">
178
-
179
- <b>add</b>(address:, port:)
180
-
181
- <a href="../../classes/Nanook/WorkPeer.html#method-i-add" name="method-i-add" class="permalink">Link</a>
182
- </div>
183
-
184
-
185
- <div class="description">
186
-
187
- </div>
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
- <div class="sourcecode">
197
-
198
- <p class="source-link">
199
- Source:
200
- <a href="javascript:toggleSource('method-i-add_source')" id="l_method-i-add_source">show</a>
201
-
202
- </p>
203
- <div id="method-i-add_source" class="dyn-source">
204
- <pre><span class="ruby-comment"># File lib/nanook/work_peer.rb, line 8</span>
205
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add</span>(<span class="ruby-value">address:</span>, <span class="ruby-value">port:</span>)
206
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:work_peer_add</span>, <span class="ruby-value">address:</span> <span class="ruby-identifier">address</span>, <span class="ruby-value">port:</span> <span class="ruby-identifier">port</span>).<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:success</span>)
207
- <span class="ruby-keyword">end</span></pre>
208
- </div>
209
- </div>
210
-
211
- </div>
212
-
213
- <div class="method">
214
- <div class="title method-title" id="method-i-clear">
215
-
216
- <b>clear</b>()
217
-
218
- <a href="../../classes/Nanook/WorkPeer.html#method-i-clear" name="method-i-clear" class="permalink">Link</a>
219
- </div>
220
-
221
-
222
- <div class="description">
223
-
224
- </div>
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
- <div class="sourcecode">
234
-
235
- <p class="source-link">
236
- Source:
237
- <a href="javascript:toggleSource('method-i-clear_source')" id="l_method-i-clear_source">show</a>
238
-
239
- </p>
240
- <div id="method-i-clear_source" class="dyn-source">
241
- <pre><span class="ruby-comment"># File lib/nanook/work_peer.rb, line 12</span>
242
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">clear</span>
243
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:work_peers_clear</span>).<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:success</span>)
244
- <span class="ruby-keyword">end</span></pre>
245
- </div>
246
- </div>
247
-
248
- </div>
249
-
250
- <div class="method">
251
- <div class="title method-title" id="method-i-list">
252
-
253
- <b>list</b>()
254
-
255
- <a href="../../classes/Nanook/WorkPeer.html#method-i-list" name="method-i-list" class="permalink">Link</a>
256
- </div>
257
-
258
-
259
- <div class="description">
260
-
261
- </div>
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
- <div class="sourcecode">
271
-
272
- <p class="source-link">
273
- Source:
274
- <a href="javascript:toggleSource('method-i-list_source')" id="l_method-i-list_source">show</a>
275
-
276
- </p>
277
- <div id="method-i-list_source" class="dyn-source">
278
- <pre><span class="ruby-comment"># File lib/nanook/work_peer.rb, line 16</span>
279
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">list</span>
280
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:work_peers</span>)[<span class="ruby-value">:work_peers</span>]
281
- <span class="ruby-keyword">end</span></pre>
282
- </div>
283
- </div>
284
-
285
- </div>
286
-
287
-
288
-
289
-
290
- </div>
291
-
292
- </div>
293
- </body>
294
- </html>