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,247 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook::Rpc</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::Rpc">
15
-
16
-
17
-
18
- <meta name="keywords" content="Nanook::Rpc class">
19
-
20
- <meta name="keywords" content="new, call">
21
-
22
- </head>
23
-
24
- <body>
25
- <div class="banner">
26
-
27
- <h1>
28
- <span class="type">Class</span>
29
- Nanook::Rpc
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/rpc_rb.html">lib/nanook/rpc.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-call">call</a>
71
- </li>
72
-
73
- </ul>
74
- </dd>
75
-
76
- <dt>N</dt>
77
- <dd>
78
- <ul>
79
-
80
-
81
- <li>
82
- <a href="#method-c-new">new</a>
83
- </li>
84
-
85
- </ul>
86
- </dd>
87
-
88
- </dl>
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
- <!-- Section constants -->
103
- <div class="sectiontitle">Constants</div>
104
- <table border='0' cellpadding='5'>
105
-
106
- <tr valign='top'>
107
- <td class="attr-name">DEFAULT_TIMEOUT</td>
108
- <td>=</td>
109
- <td class="attr-value">500</td>
110
- </tr>
111
-
112
- <tr valign='top'>
113
- <td>&nbsp;</td>
114
- <td colspan="2" class="attr-desc"></td>
115
- </tr>
116
-
117
-
118
- <tr valign='top'>
119
- <td class="attr-name">DEFAULT_URI</td>
120
- <td>=</td>
121
- <td class="attr-value">&quot;http://localhost:7076&quot;</td>
122
- </tr>
123
-
124
- <tr valign='top'>
125
- <td>&nbsp;</td>
126
- <td colspan="2" class="attr-desc"></td>
127
- </tr>
128
-
129
-
130
- </table>
131
-
132
-
133
-
134
-
135
-
136
-
137
- <!-- Methods -->
138
-
139
- <div class="sectiontitle">Class Public methods</div>
140
-
141
- <div class="method">
142
- <div class="title method-title" id="method-c-new">
143
-
144
- <b>new</b>(uri=DEFAULT_URI, timeout:DEFAULT_TIMEOUT)
145
-
146
- <a href="../../classes/Nanook/Rpc.html#method-c-new" name="method-c-new" class="permalink">Link</a>
147
- </div>
148
-
149
-
150
- <div class="description">
151
-
152
- </div>
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
- <div class="sourcecode">
162
-
163
- <p class="source-link">
164
- Source:
165
- <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
166
-
167
- </p>
168
- <div id="method-c-new_source" class="dyn-source">
169
- <pre><span class="ruby-comment"># File lib/nanook/rpc.rb, line 10</span>
170
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">uri</span>=<span class="ruby-constant">DEFAULT_URI</span>, <span class="ruby-value">timeout:</span><span class="ruby-constant">DEFAULT_TIMEOUT</span>)
171
- <span class="ruby-identifier">rpc_server</span> = <span class="ruby-constant">URI</span>(<span class="ruby-identifier">uri</span>)
172
-
173
- <span class="ruby-keyword">unless</span> [<span class="ruby-string">&#39;http&#39;</span>, <span class="ruby-string">&#39;https&#39;</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">rpc_server</span>.<span class="ruby-identifier">scheme</span>)
174
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;URI must have http or https in it. Was given: #{uri}&quot;</span>)
175
- <span class="ruby-keyword">end</span>
176
-
177
- <span class="ruby-ivar">@http</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rpc_server</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">rpc_server</span>.<span class="ruby-identifier">port</span>)
178
- <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">read_timeout</span> = <span class="ruby-identifier">timeout</span>
179
- <span class="ruby-ivar">@request</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Post</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rpc_server</span>.<span class="ruby-identifier">request_uri</span>, {<span class="ruby-string">&quot;user-agent&quot;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-string">&quot;Ruby nanook gem&quot;</span>})
180
- <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">content_type</span> = <span class="ruby-string">&quot;application/json&quot;</span>
181
- <span class="ruby-keyword">end</span></pre>
182
- </div>
183
- </div>
184
-
185
- </div>
186
-
187
-
188
-
189
- <div class="sectiontitle">Instance Public methods</div>
190
-
191
- <div class="method">
192
- <div class="title method-title" id="method-i-call">
193
-
194
- <b>call</b>(action, params={})
195
-
196
- <a href="../../classes/Nanook/Rpc.html#method-i-call" name="method-i-call" class="permalink">Link</a>
197
- </div>
198
-
199
-
200
- <div class="description">
201
-
202
- </div>
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
- <div class="sourcecode">
212
-
213
- <p class="source-link">
214
- Source:
215
- <a href="javascript:toggleSource('method-i-call_source')" id="l_method-i-call_source">show</a>
216
-
217
- </p>
218
- <div id="method-i-call_source" class="dyn-source">
219
- <pre><span class="ruby-comment"># File lib/nanook/rpc.rb, line 23</span>
220
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">call</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">params</span>={})
221
- <span class="ruby-comment"># Stringify param values</span>
222
- <span class="ruby-identifier">params</span> = <span class="ruby-constant">Hash</span>[<span class="ruby-identifier">params</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>] }]
223
-
224
- <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">body</span> = { <span class="ruby-value">action:</span> <span class="ruby-identifier">action</span> }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">params</span>).<span class="ruby-identifier">to_json</span>
225
-
226
- <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-ivar">@request</span>)
227
-
228
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPSuccess</span>)
229
- <span class="ruby-identifier">hash</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>)
230
- <span class="ruby-identifier">process_hash</span>(<span class="ruby-identifier">hash</span>)
231
- <span class="ruby-keyword">else</span>
232
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;Encountered net/http error #{response.code}: #{response.class.name}&quot;</span>)
233
- <span class="ruby-keyword">end</span>
234
- <span class="ruby-keyword">end</span></pre>
235
- </div>
236
- </div>
237
-
238
- </div>
239
-
240
-
241
-
242
-
243
- </div>
244
-
245
- </div>
246
- </body>
247
- </html>
@@ -1,264 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook::Util</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::Util">
15
-
16
-
17
-
18
- <meta name="keywords" content="Nanook::Util class">
19
-
20
- <meta name="keywords" content="NANO_to_raw, raw_to_NANO, coerce_empty_string_to_type">
21
-
22
- </head>
23
-
24
- <body>
25
- <div class="banner">
26
-
27
- <h1>
28
- <span class="type">Class</span>
29
- Nanook::Util
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/util_rb.html">lib/nanook/util.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>N</dt>
65
- <dd>
66
- <ul>
67
-
68
-
69
- <li>
70
- <a href="#method-c-NANO_to_raw">NANO_to_raw</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-c-coerce_empty_string_to_type">coerce_empty_string_to_type</a>
83
- </li>
84
-
85
- </ul>
86
- </dd>
87
-
88
- <dt>R</dt>
89
- <dd>
90
- <ul>
91
-
92
-
93
- <li>
94
- <a href="#method-c-raw_to_NANO">raw_to_NANO</a>
95
- </li>
96
-
97
- </ul>
98
- </dd>
99
-
100
- </dl>
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
- <!-- Section constants -->
115
- <div class="sectiontitle">Constants</div>
116
- <table border='0' cellpadding='5'>
117
-
118
- <tr valign='top'>
119
- <td class="attr-name">STEP</td>
120
- <td>=</td>
121
- <td class="attr-value">BigDecimal.new(&quot;10&quot;)**BigDecimal.new(&quot;30&quot;)</td>
122
- </tr>
123
-
124
- <tr valign='top'>
125
- <td>&nbsp;</td>
126
- <td colspan="2" class="attr-desc"></td>
127
- </tr>
128
-
129
-
130
- </table>
131
-
132
-
133
-
134
-
135
-
136
-
137
- <!-- Methods -->
138
-
139
- <div class="sectiontitle">Class Public methods</div>
140
-
141
- <div class="method">
142
- <div class="title method-title" id="method-c-NANO_to_raw">
143
-
144
- <b>NANO_to_raw</b>(nano)
145
-
146
- <a href="../../classes/Nanook/Util.html#method-c-NANO_to_raw" name="method-c-NANO_to_raw" class="permalink">Link</a>
147
- </div>
148
-
149
-
150
- <div class="description">
151
-
152
- </div>
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
- <div class="sourcecode">
162
-
163
- <p class="source-link">
164
- Source:
165
- <a href="javascript:toggleSource('method-c-NANO_to_raw_source')" id="l_method-c-NANO_to_raw_source">show</a>
166
-
167
- </p>
168
- <div id="method-c-NANO_to_raw_source" class="dyn-source">
169
- <pre><span class="ruby-comment"># File lib/nanook/util.rb, line 8</span>
170
- <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-constant">NANO_to_raw</span>(<span class="ruby-identifier ruby-title">nano</span>)
171
- (<span class="ruby-constant">BigDecimal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">nano</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-operator">*</span> <span class="ruby-constant">STEP</span>).<span class="ruby-identifier">to_i</span>
172
- <span class="ruby-keyword">end</span></pre>
173
- </div>
174
- </div>
175
-
176
- </div>
177
-
178
- <div class="method">
179
- <div class="title method-title" id="method-c-coerce_empty_string_to_type">
180
-
181
- <b>coerce_empty_string_to_type</b>(response, type)
182
-
183
- <a href="../../classes/Nanook/Util.html#method-c-coerce_empty_string_to_type" name="method-c-coerce_empty_string_to_type" class="permalink">Link</a>
184
- </div>
185
-
186
-
187
- <div class="description">
188
-
189
- </div>
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
- <div class="sourcecode">
199
-
200
- <p class="source-link">
201
- Source:
202
- <a href="javascript:toggleSource('method-c-coerce_empty_string_to_type_source')" id="l_method-c-coerce_empty_string_to_type_source">show</a>
203
-
204
- </p>
205
- <div id="method-c-coerce_empty_string_to_type_source" class="dyn-source">
206
- <pre><span class="ruby-comment"># File lib/nanook/util.rb, line 16</span>
207
- <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">coerce_empty_string_to_type</span>(<span class="ruby-identifier">response</span>, <span class="ruby-identifier">type</span>)
208
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">response</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;&quot;</span>
209
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">new</span>
210
- <span class="ruby-keyword">end</span>
211
-
212
- <span class="ruby-identifier">response</span>
213
- <span class="ruby-keyword">end</span></pre>
214
- </div>
215
- </div>
216
-
217
- </div>
218
-
219
- <div class="method">
220
- <div class="title method-title" id="method-c-raw_to_NANO">
221
-
222
- <b>raw_to_NANO</b>(raw)
223
-
224
- <a href="../../classes/Nanook/Util.html#method-c-raw_to_NANO" name="method-c-raw_to_NANO" class="permalink">Link</a>
225
- </div>
226
-
227
-
228
- <div class="description">
229
-
230
- </div>
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
- <div class="sourcecode">
240
-
241
- <p class="source-link">
242
- Source:
243
- <a href="javascript:toggleSource('method-c-raw_to_NANO_source')" id="l_method-c-raw_to_NANO_source">show</a>
244
-
245
- </p>
246
- <div id="method-c-raw_to_NANO_source" class="dyn-source">
247
- <pre><span class="ruby-comment"># File lib/nanook/util.rb, line 12</span>
248
- <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">raw_to_NANO</span>(<span class="ruby-identifier">raw</span>)
249
- <span class="ruby-identifier">raw</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-constant">STEP</span>
250
- <span class="ruby-keyword">end</span></pre>
251
- </div>
252
- </div>
253
-
254
- </div>
255
-
256
-
257
-
258
-
259
-
260
- </div>
261
-
262
- </div>
263
- </body>
264
- </html>