bauxite 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/Rakefile +69 -0
  4. data/bin/bauxite +27 -0
  5. data/doc/Bauxite/Action.html +1463 -0
  6. data/doc/Bauxite/ActionModule.html +342 -0
  7. data/doc/Bauxite/Context.html +1439 -0
  8. data/doc/Bauxite/Errors/AssertionError.html +107 -0
  9. data/doc/Bauxite/Errors/FileNotFoundError.html +107 -0
  10. data/doc/Bauxite/Errors.html +100 -0
  11. data/doc/Bauxite/Loggers/CompositeLogger.html +325 -0
  12. data/doc/Bauxite/Loggers/EchoLogger.html +164 -0
  13. data/doc/Bauxite/Loggers/FileLogger.html +215 -0
  14. data/doc/Bauxite/Loggers/NullLogger.html +334 -0
  15. data/doc/Bauxite/Loggers/TerminalLogger.html +586 -0
  16. data/doc/Bauxite/Loggers/XtermLogger.html +287 -0
  17. data/doc/Bauxite/Loggers.html +103 -0
  18. data/doc/Bauxite/Selector.html +422 -0
  19. data/doc/Bauxite/SelectorModule.html +283 -0
  20. data/doc/Bauxite.html +98 -0
  21. data/doc/created.rid +37 -0
  22. data/doc/fonts/Lato-Light.ttf +0 -0
  23. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  24. data/doc/fonts/Lato-Regular.ttf +0 -0
  25. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  26. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  27. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  28. data/doc/fonts.css +167 -0
  29. data/doc/images/add.png +0 -0
  30. data/doc/images/arrow_up.png +0 -0
  31. data/doc/images/brick.png +0 -0
  32. data/doc/images/brick_link.png +0 -0
  33. data/doc/images/bug.png +0 -0
  34. data/doc/images/bullet_black.png +0 -0
  35. data/doc/images/bullet_toggle_minus.png +0 -0
  36. data/doc/images/bullet_toggle_plus.png +0 -0
  37. data/doc/images/date.png +0 -0
  38. data/doc/images/delete.png +0 -0
  39. data/doc/images/find.png +0 -0
  40. data/doc/images/loadingAnimation.gif +0 -0
  41. data/doc/images/macFFBgHack.png +0 -0
  42. data/doc/images/package.png +0 -0
  43. data/doc/images/page_green.png +0 -0
  44. data/doc/images/page_white_text.png +0 -0
  45. data/doc/images/page_white_width.png +0 -0
  46. data/doc/images/plugin.png +0 -0
  47. data/doc/images/ruby.png +0 -0
  48. data/doc/images/tag_blue.png +0 -0
  49. data/doc/images/tag_green.png +0 -0
  50. data/doc/images/transparent.png +0 -0
  51. data/doc/images/wrench.png +0 -0
  52. data/doc/images/wrench_orange.png +0 -0
  53. data/doc/images/zoom.png +0 -0
  54. data/doc/index.html +111 -0
  55. data/doc/js/darkfish.js +140 -0
  56. data/doc/js/jquery.js +18 -0
  57. data/doc/js/navigation.js +142 -0
  58. data/doc/js/search.js +109 -0
  59. data/doc/js/search_index.js +1 -0
  60. data/doc/js/searcher.js +228 -0
  61. data/doc/rdoc.css +580 -0
  62. data/doc/table_of_contents.html +510 -0
  63. data/lib/bauxite/actions/alias.rb +51 -0
  64. data/lib/bauxite/actions/assert.rb +49 -0
  65. data/lib/bauxite/actions/assertv.rb +40 -0
  66. data/lib/bauxite/actions/break.rb +39 -0
  67. data/lib/bauxite/actions/click.rb +35 -0
  68. data/lib/bauxite/actions/debug.rb +99 -0
  69. data/lib/bauxite/actions/echo.rb +36 -0
  70. data/lib/bauxite/actions/exec.rb +46 -0
  71. data/lib/bauxite/actions/js.rb +41 -0
  72. data/lib/bauxite/actions/load.rb +49 -0
  73. data/lib/bauxite/actions/open.rb +34 -0
  74. data/lib/bauxite/actions/params.rb +40 -0
  75. data/lib/bauxite/actions/replace.rb +37 -0
  76. data/lib/bauxite/actions/reset.rb +37 -0
  77. data/lib/bauxite/actions/return.rb +62 -0
  78. data/lib/bauxite/actions/ruby.rb +58 -0
  79. data/lib/bauxite/actions/set.rb +39 -0
  80. data/lib/bauxite/actions/source.rb +44 -0
  81. data/lib/bauxite/actions/store.rb +38 -0
  82. data/lib/bauxite/actions/test.rb +61 -0
  83. data/lib/bauxite/actions/tryload.rb +79 -0
  84. data/lib/bauxite/actions/wait.rb +38 -0
  85. data/lib/bauxite/actions/write.rb +40 -0
  86. data/lib/bauxite/application.rb +150 -0
  87. data/lib/bauxite/core/Action.rb +205 -0
  88. data/lib/bauxite/core/Context.rb +575 -0
  89. data/lib/bauxite/core/Errors.rb +36 -0
  90. data/lib/bauxite/core/Logger.rb +86 -0
  91. data/lib/bauxite/core/Selector.rb +156 -0
  92. data/lib/bauxite/loggers/composite.rb +70 -0
  93. data/lib/bauxite/loggers/echo.rb +36 -0
  94. data/lib/bauxite/loggers/file.rb +45 -0
  95. data/lib/bauxite/loggers/terminal.rb +130 -0
  96. data/lib/bauxite/loggers/xterm.rb +79 -0
  97. data/lib/bauxite/selectors/attr.rb +39 -0
  98. data/lib/bauxite/selectors/default.rb +38 -0
  99. data/lib/bauxite/selectors/frame.rb +60 -0
  100. data/lib/bauxite.rb +29 -0
  101. data/test/alias.bxt +6 -0
  102. data/test/assertv.bxt +2 -0
  103. data/test/delay/page.html +5 -0
  104. data/test/delay.bxt +2 -0
  105. data/test/exec.bxt +6 -0
  106. data/test/format/page.html +7 -0
  107. data/test/format.bxt +17 -0
  108. data/test/frame/child_frame.html +7 -0
  109. data/test/frame/grandchild_frame.html +5 -0
  110. data/test/frame/page.html +5 -0
  111. data/test/frame.bxt +6 -0
  112. data/test/js.bxt +5 -0
  113. data/test/load/child.bxt +13 -0
  114. data/test/load.bxt +17 -0
  115. data/test/ruby/custom.rb +5 -0
  116. data/test/ruby.bxt +2 -0
  117. data/test/selectors/page.html +7 -0
  118. data/test/selectors.bxt +7 -0
  119. data/test/stdin.bxt +1 -0
  120. data/test/test/test1.bxt +2 -0
  121. data/test/test/test2.bxt +3 -0
  122. data/test/test/test3.bxt +2 -0
  123. data/test/test.bxt.manual +4 -0
  124. metadata +194 -0
@@ -0,0 +1,586 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Bauxite::Loggers::TerminalLogger - RDoc Documentation</title>
8
+
9
+ <link href="../../fonts.css" rel="stylesheet">
10
+ <link href="../../rdoc.css" rel="stylesheet">
11
+
12
+ <script type="text/javascript">
13
+ var rdoc_rel_prefix = "../../";
14
+ </script>
15
+
16
+ <script src="../../js/jquery.js"></script>
17
+ <script src="../../js/navigation.js"></script>
18
+ <script src="../../js/search_index.js"></script>
19
+ <script src="../../js/search.js"></script>
20
+ <script src="../../js/searcher.js"></script>
21
+ <script src="../../js/darkfish.js"></script>
22
+
23
+
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../../table_of_contents.html#pages">Pages</a>
34
+ <a href="../../table_of_contents.html#classes">Classes</a>
35
+ <a href="../../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+ <div id="parent-class-section" class="nav-section">
61
+ <h3>Parent</h3>
62
+
63
+
64
+ <p class="link"><a href="NullLogger.html">Bauxite::Loggers::NullLogger</a>
65
+
66
+ </div>
67
+
68
+
69
+
70
+ <!-- Method Quickref -->
71
+ <div id="method-list-section" class="nav-section">
72
+ <h3>Methods</h3>
73
+
74
+ <ul class="link-list" role="directory">
75
+
76
+ <li class="calls-super" ><a href="#method-c-new">::new</a>
77
+
78
+ <li ><a href="#method-i-_block">#_block</a>
79
+
80
+ <li ><a href="#method-i-_cmd_color">#_cmd_color</a>
81
+
82
+ <li ><a href="#method-i-_fmt">#_fmt</a>
83
+
84
+ <li ><a href="#method-i-_restore_cursor">#_restore_cursor</a>
85
+
86
+ <li ><a href="#method-i-_save_cursor">#_save_cursor</a>
87
+
88
+ <li ><a href="#method-i-_screen_width">#_screen_width</a>
89
+
90
+ <li class="calls-super" ><a href="#method-i-debug_prompt">#debug_prompt</a>
91
+
92
+ <li class="calls-super" ><a href="#method-i-log">#log</a>
93
+
94
+ <li ><a href="#method-i-log_cmd">#log_cmd</a>
95
+
96
+ <li ><a href="#method-i-progress">#progress</a>
97
+
98
+ </ul>
99
+ </div>
100
+
101
+ </div>
102
+ </nav>
103
+
104
+ <main role="main" aria-labelledby="class-Bauxite::Loggers::TerminalLogger">
105
+ <h1 id="class-Bauxite::Loggers::TerminalLogger" class="class">
106
+ class Bauxite::Loggers::TerminalLogger
107
+ </h1>
108
+
109
+ <section class="description">
110
+
111
+ <p>Terminal logger.</p>
112
+
113
+ <p>This logger outputs text using basic text formatting for a terminal window.</p>
114
+
115
+ </section>
116
+
117
+
118
+
119
+
120
+ <section id="5Buntitled-5D" class="documentation-section">
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
131
+ <header>
132
+ <h3>Public Class Methods</h3>
133
+ </header>
134
+
135
+
136
+ <div id="method-c-new" class="method-detail ">
137
+
138
+ <div class="method-heading">
139
+ <span class="method-name">new</span><span
140
+ class="method-args">(options)</span>
141
+
142
+ <span class="method-click-advice">click to toggle source</span>
143
+
144
+ </div>
145
+
146
+
147
+ <div class="method-description">
148
+
149
+ <p>Constructs a new Terminal logger instance.</p>
150
+
151
+
152
+ <div class="method-calls-super">
153
+ Calls superclass method
154
+ <a href="NullLogger.html#method-c-new">Bauxite::Loggers::NullLogger.new</a>
155
+ </div>
156
+
157
+
158
+
159
+ <div class="method-source-code" id="new-source">
160
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 30</span>
161
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
162
+ <span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
163
+ <span class="ruby-ivar">@max_cmd_size</span> = <span class="ruby-constant">Bauxite</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">max_action_name_size</span>
164
+ <span class="ruby-keyword">end</span></pre>
165
+ </div>
166
+
167
+ </div>
168
+
169
+
170
+
171
+
172
+ </div>
173
+
174
+
175
+ </section>
176
+
177
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
178
+ <header>
179
+ <h3>Public Instance Methods</h3>
180
+ </header>
181
+
182
+
183
+ <div id="method-i-debug_prompt" class="method-detail ">
184
+
185
+ <div class="method-heading">
186
+ <span class="method-name">debug_prompt</span><span
187
+ class="method-args">()</span>
188
+
189
+ <span class="method-click-advice">click to toggle source</span>
190
+
191
+ </div>
192
+
193
+
194
+ <div class="method-description">
195
+
196
+ <p>Returns a colorized debug prompt.</p>
197
+
198
+
199
+ <div class="method-calls-super">
200
+ Calls superclass method
201
+ <a href="NullLogger.html#method-i-debug_prompt">Bauxite::Loggers::NullLogger#debug_prompt</a>
202
+ </div>
203
+
204
+
205
+
206
+ <div class="method-source-code" id="debug_prompt-source">
207
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 65</span>
208
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">debug_prompt</span>
209
+ <span class="ruby-identifier">_fmt</span>(<span class="ruby-value">:white</span>, <span class="ruby-keyword">super</span>)
210
+ <span class="ruby-keyword">end</span></pre>
211
+ </div>
212
+
213
+ </div>
214
+
215
+
216
+
217
+
218
+ </div>
219
+
220
+
221
+ <div id="method-i-log" class="method-detail ">
222
+
223
+ <div class="method-heading">
224
+ <span class="method-name">log</span><span
225
+ class="method-args">(s, type = :info)</span>
226
+
227
+ <span class="method-click-advice">click to toggle source</span>
228
+
229
+ </div>
230
+
231
+
232
+ <div class="method-description">
233
+
234
+ <p>Prints the specified string.</p>
235
+
236
+ <p>See Bauxite::Loggers::NullLogger#print</p>
237
+
238
+
239
+ <div class="method-calls-super">
240
+ Calls superclass method
241
+ <a href="NullLogger.html#method-i-log">Bauxite::Loggers::NullLogger#log</a>
242
+ </div>
243
+
244
+
245
+
246
+ <div class="method-source-code" id="log-source">
247
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 80</span>
248
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">type</span> = <span class="ruby-value">:info</span>)
249
+ <span class="ruby-identifier">color</span> = <span class="ruby-value">:gray</span>
250
+ <span class="ruby-keyword">case</span> <span class="ruby-identifier">type</span>
251
+ <span class="ruby-keyword">when</span> <span class="ruby-value">:error</span>
252
+ <span class="ruby-identifier">color</span> = <span class="ruby-value">:red</span>
253
+ <span class="ruby-keyword">when</span> <span class="ruby-value">:warning</span>
254
+ <span class="ruby-identifier">color</span> = <span class="ruby-value">:yellow</span>
255
+ <span class="ruby-keyword">when</span> <span class="ruby-value">:debug</span>
256
+ <span class="ruby-identifier">color</span> = <span class="ruby-value">:purple</span>
257
+ <span class="ruby-keyword">end</span>
258
+ <span class="ruby-keyword">super</span> <span class="ruby-identifier">_fmt</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">s</span>), <span class="ruby-identifier">type</span>
259
+ <span class="ruby-keyword">end</span></pre>
260
+ </div>
261
+
262
+ </div>
263
+
264
+
265
+
266
+
267
+ </div>
268
+
269
+
270
+ <div id="method-i-log_cmd" class="method-detail ">
271
+
272
+ <div class="method-heading">
273
+ <span class="method-name">log_cmd</span><span
274
+ class="method-args">(action) { || ... }</span>
275
+
276
+ <span class="method-click-advice">click to toggle source</span>
277
+
278
+ </div>
279
+
280
+
281
+ <div class="method-description">
282
+
283
+ <p>Pretty prints action information and status.</p>
284
+
285
+
286
+
287
+
288
+ <div class="method-source-code" id="log_cmd-source">
289
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 36</span>
290
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">log_cmd</span>(<span class="ruby-identifier">action</span>)
291
+ <span class="ruby-identifier">width</span> = <span class="ruby-identifier">_screen_width</span>
292
+ <span class="ruby-identifier">cmd</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">downcase</span>
293
+ <span class="ruby-identifier">color</span> = <span class="ruby-identifier">_cmd_color</span>(<span class="ruby-identifier">cmd</span>)
294
+ <span class="ruby-identifier">cmd</span> = <span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">ljust</span>(<span class="ruby-ivar">@max_cmd_size</span>)
295
+ <span class="ruby-identifier">max_args_size</span> = <span class="ruby-identifier">width</span><span class="ruby-operator">-</span><span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span><span class="ruby-operator">-</span><span class="ruby-value">6</span><span class="ruby-operator">-</span><span class="ruby-value">1</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>
296
+
297
+ <span class="ruby-identifier">print</span> <span class="ruby-node">&quot;#{_fmt(color, cmd)} &quot;</span>
298
+ <span class="ruby-identifier">s</span> = <span class="ruby-identifier">action</span>.<span class="ruby-identifier">args</span>(<span class="ruby-keyword">true</span>).<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39; &#39;</span>)
299
+ <span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">max_args_size</span><span class="ruby-operator">-</span><span class="ruby-value">3</span>]<span class="ruby-operator">+</span><span class="ruby-string">&#39;...&#39;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max_args_size</span>
300
+ <span class="ruby-identifier">print</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">ljust</span>(<span class="ruby-identifier">max_args_size</span>)
301
+ <span class="ruby-identifier">_save_cursor</span>
302
+ <span class="ruby-identifier">color</span> = <span class="ruby-value">:green</span>
303
+ <span class="ruby-identifier">text</span> = <span class="ruby-string">&#39;OK&#39;</span>
304
+ <span class="ruby-identifier">ret</span> = <span class="ruby-keyword">yield</span>
305
+ <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">ret</span>
306
+ <span class="ruby-identifier">color</span> = <span class="ruby-value">:yellow</span>
307
+ <span class="ruby-identifier">text</span> = <span class="ruby-string">&#39;SKIP&#39;</span>
308
+ <span class="ruby-keyword">end</span>
309
+ <span class="ruby-identifier">_restore_cursor</span>
310
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot; #{_block(color, text, 5)}&quot;</span>
311
+ <span class="ruby-identifier">ret</span>
312
+ <span class="ruby-keyword">rescue</span>
313
+ <span class="ruby-identifier">_restore_cursor</span>
314
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot; #{_block(:red, &#39;ERROR&#39;, 5)}&quot;</span>
315
+ <span class="ruby-identifier">raise</span>
316
+ <span class="ruby-keyword">end</span></pre>
317
+ </div>
318
+
319
+ </div>
320
+
321
+
322
+
323
+
324
+ </div>
325
+
326
+
327
+ <div id="method-i-progress" class="method-detail ">
328
+
329
+ <div class="method-heading">
330
+ <span class="method-name">progress</span><span
331
+ class="method-args">(value)</span>
332
+
333
+ <span class="method-click-advice">click to toggle source</span>
334
+
335
+ </div>
336
+
337
+
338
+ <div class="method-description">
339
+
340
+ <p>Updates action progress.</p>
341
+
342
+
343
+
344
+
345
+ <div class="method-source-code" id="progress-source">
346
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 70</span>
347
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">progress</span>(<span class="ruby-identifier">value</span>)
348
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">_restore_cursor</span>
349
+ <span class="ruby-identifier">print</span> <span class="ruby-node">&quot; #{_block(:gray, value.to_s, 5)}&quot;</span>
350
+ <span class="ruby-keyword">end</span>
351
+ <span class="ruby-keyword">end</span></pre>
352
+ </div>
353
+
354
+ </div>
355
+
356
+
357
+
358
+
359
+ </div>
360
+
361
+
362
+ </section>
363
+
364
+ <section id="protected-instance-5Buntitled-5D-method-details" class="method-section">
365
+ <header>
366
+ <h3>Protected Instance Methods</h3>
367
+ </header>
368
+
369
+
370
+ <div id="method-i-_block" class="method-detail ">
371
+
372
+ <div class="method-heading">
373
+ <span class="method-name">_block</span><span
374
+ class="method-args">(color, text, size)</span>
375
+
376
+ <span class="method-click-advice">click to toggle source</span>
377
+
378
+ </div>
379
+
380
+
381
+ <div class="method-description">
382
+
383
+ <p>Prints <code>text</code> centered inside a square-bracketed block.</p>
384
+
385
+
386
+
387
+
388
+ <div class="method-source-code" id="_block-source">
389
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 110</span>
390
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">_block</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">size</span>)
391
+ <span class="ruby-node">&quot;#{_fmt(:white, &#39;[&#39;)}#{_fmt(color, text, size)}#{_fmt(:white, &#39;]&#39;)}&quot;</span>
392
+ <span class="ruby-keyword">end</span></pre>
393
+ </div>
394
+
395
+ </div>
396
+
397
+
398
+
399
+
400
+ </div>
401
+
402
+
403
+ <div id="method-i-_cmd_color" class="method-detail ">
404
+
405
+ <div class="method-heading">
406
+ <span class="method-name">_cmd_color</span><span
407
+ class="method-args">(cmd)</span>
408
+
409
+ <span class="method-click-advice">click to toggle source</span>
410
+
411
+ </div>
412
+
413
+
414
+ <div class="method-description">
415
+
416
+ <p>Get the color of <code>cmd</code>.</p>
417
+
418
+
419
+
420
+
421
+ <div class="method-source-code" id="_cmd_color-source">
422
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 115</span>
423
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">_cmd_color</span>(<span class="ruby-identifier">cmd</span>)
424
+ <span class="ruby-keyword">case</span> <span class="ruby-identifier">cmd</span>
425
+ <span class="ruby-keyword">when</span> <span class="ruby-string">&#39;load&#39;</span>
426
+ <span class="ruby-keyword">return</span> <span class="ruby-value">:cyan</span>
427
+ <span class="ruby-keyword">when</span> <span class="ruby-string">&#39;test&#39;</span>
428
+ <span class="ruby-keyword">return</span> <span class="ruby-value">:purple</span>
429
+ <span class="ruby-keyword">else</span>
430
+ <span class="ruby-keyword">return</span> <span class="ruby-value">:blue</span>
431
+ <span class="ruby-keyword">end</span>
432
+ <span class="ruby-keyword">end</span></pre>
433
+ </div>
434
+
435
+ </div>
436
+
437
+
438
+
439
+
440
+ </div>
441
+
442
+
443
+ <div id="method-i-_fmt" class="method-detail ">
444
+
445
+ <div class="method-heading">
446
+ <span class="method-name">_fmt</span><span
447
+ class="method-args">(color, text, size = 0)</span>
448
+
449
+ <span class="method-click-advice">click to toggle source</span>
450
+
451
+ </div>
452
+
453
+
454
+ <div class="method-description">
455
+
456
+ <p>Centers <code>text</code> to a fixed size with.</p>
457
+
458
+
459
+
460
+
461
+ <div class="method-source-code" id="_fmt-source">
462
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 95</span>
463
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">_fmt</span>(<span class="ruby-identifier">color</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">size</span> = <span class="ruby-value">0</span>)
464
+ <span class="ruby-identifier">text</span>.<span class="ruby-identifier">center</span>(<span class="ruby-identifier">size</span>)
465
+ <span class="ruby-keyword">end</span></pre>
466
+ </div>
467
+
468
+ </div>
469
+
470
+
471
+
472
+
473
+ </div>
474
+
475
+
476
+ <div id="method-i-_restore_cursor" class="method-detail ">
477
+
478
+ <div class="method-heading">
479
+ <span class="method-name">_restore_cursor</span><span
480
+ class="method-args">()</span>
481
+
482
+ <span class="method-click-advice">click to toggle source</span>
483
+
484
+ </div>
485
+
486
+
487
+ <div class="method-description">
488
+
489
+ <p>Restores the cursor to the previously saved cursor position.</p>
490
+
491
+
492
+
493
+
494
+ <div class="method-source-code" id="_restore_cursor-source">
495
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 105</span>
496
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">_restore_cursor</span>
497
+ <span class="ruby-keyword">false</span>
498
+ <span class="ruby-keyword">end</span></pre>
499
+ </div>
500
+
501
+ </div>
502
+
503
+
504
+
505
+
506
+ </div>
507
+
508
+
509
+ <div id="method-i-_save_cursor" class="method-detail ">
510
+
511
+ <div class="method-heading">
512
+ <span class="method-name">_save_cursor</span><span
513
+ class="method-args">()</span>
514
+
515
+ <span class="method-click-advice">click to toggle source</span>
516
+
517
+ </div>
518
+
519
+
520
+ <div class="method-description">
521
+
522
+ <p>Save the current cursor position,</p>
523
+
524
+
525
+
526
+
527
+ <div class="method-source-code" id="_save_cursor-source">
528
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 100</span>
529
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">_save_cursor</span>
530
+ <span class="ruby-keyword">false</span>
531
+ <span class="ruby-keyword">end</span></pre>
532
+ </div>
533
+
534
+ </div>
535
+
536
+
537
+
538
+
539
+ </div>
540
+
541
+
542
+ <div id="method-i-_screen_width" class="method-detail ">
543
+
544
+ <div class="method-heading">
545
+ <span class="method-name">_screen_width</span><span
546
+ class="method-args">()</span>
547
+
548
+ <span class="method-click-advice">click to toggle source</span>
549
+
550
+ </div>
551
+
552
+
553
+ <div class="method-description">
554
+
555
+ <p>Returns the terminal screen width.</p>
556
+
557
+
558
+
559
+
560
+ <div class="method-source-code" id="_screen_width-source">
561
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/terminal.rb, line 127</span>
562
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">_screen_width</span>
563
+ <span class="ruby-value">80</span>
564
+ <span class="ruby-keyword">end</span></pre>
565
+ </div>
566
+
567
+ </div>
568
+
569
+
570
+
571
+
572
+ </div>
573
+
574
+
575
+ </section>
576
+
577
+ </section>
578
+ </main>
579
+
580
+
581
+ <footer id="validator-badges" role="contentinfo">
582
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
583
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
584
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
585
+ </footer>
586
+