vedeu 0.8.17 → 0.8.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Guardfile +1 -1
- data/docs/configuration/base_path.md +11 -0
- data/docs/configuration/colour.md +6 -0
- data/docs/configuration/colour_mode.md +13 -0
- data/docs/configuration/compression.md +22 -0
- data/docs/configuration/cooked.md +7 -0
- data/docs/configuration/debug.md +20 -0
- data/docs/configuration/drb_height.md +6 -0
- data/docs/configuration/drb_width.md +6 -0
- data/docs/configuration/fake.md +6 -0
- data/docs/configuration/height.md +12 -0
- data/docs/configuration/log.md +15 -0
- data/docs/configuration/log_except.md +11 -0
- data/docs/configuration/log_only.md +11 -0
- data/docs/configuration/mouse.md +11 -0
- data/docs/configuration/profile.md +22 -0
- data/docs/configuration/raw.md +7 -0
- data/docs/configuration/renderer.md +13 -0
- data/docs/configuration/root.md +9 -0
- data/docs/configuration/stderr.md +6 -0
- data/docs/configuration/stdin.md +6 -0
- data/docs/configuration/stdout.md +6 -0
- data/docs/configuration/terminal_mode.md +23 -0
- data/docs/configuration/threaded.md +3 -0
- data/docs/configuration/width.md +11 -0
- data/integrations/dsl_app_001.rb +1 -1
- data/integrations/dsl_app_002.rb +1 -1
- data/integrations/dsl_app_003.rb +1 -1
- data/integrations/dsl_app_004.rb +1 -1
- data/integrations/dsl_app_005.rb +1 -1
- data/integrations/dsl_app_006.rb +1 -1
- data/integrations/dsl_app_007.rb +1 -1
- data/integrations/dsl_app_008.rb +1 -1
- data/integrations/dsl_app_009.rb +1 -1
- data/integrations/dsl_app_010.rb +1 -1
- data/integrations/dsl_app_011.rb +1 -1
- data/integrations/dsl_app_012.rb +1 -1
- data/integrations/dsl_app_013.rb +1 -1
- data/integrations/dsl_app_014.rb +1 -1
- data/integrations/dsl_app_015.rb +1 -1
- data/integrations/dsl_app_016.rb +1 -1
- data/integrations/dsl_app_017.rb +1 -1
- data/integrations/dsl_app_018.rb +1 -1
- data/integrations/dsl_app_019.rb +1 -1
- data/integrations/dsl_app_020.rb +1 -1
- data/integrations/dsl_app_021.rb +1 -1
- data/integrations/dsl_app_022.rb +1 -1
- data/integrations/dsl_app_border_001.rb +1 -1
- data/integrations/dsl_app_border_002.rb +1 -1
- data/integrations/dsl_app_border_003.rb +1 -1
- data/integrations/dsl_app_border_004.rb +1 -1
- data/integrations/dsl_app_border_005.rb +1 -1
- data/lib/vedeu/application/application_view.rb +3 -3
- data/lib/vedeu/coercers/coercer.rb +17 -6
- data/lib/vedeu/coercers/colour.rb +2 -2
- data/lib/vedeu/coercers/editor_line.rb +1 -1
- data/lib/vedeu/colours/translator.rb +7 -4
- data/lib/vedeu/common.rb +1 -1
- data/lib/vedeu/configuration/api.rb +24 -279
- data/lib/vedeu/configuration/configuration.rb +53 -53
- data/lib/vedeu/distributed/all.rb +0 -1
- data/lib/vedeu/distributed/subprocess.rb +3 -4
- data/lib/vedeu/error.rb +11 -6
- data/lib/vedeu/events/trigger.rb +1 -1
- data/lib/vedeu/groups/group.rb +0 -1
- data/lib/vedeu/logging/log.rb +7 -8
- data/lib/vedeu/renderers/support/options.rb +2 -2
- data/lib/vedeu/support/point.rb +1 -1
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/coercers/coercer_test.rb +9 -3
- data/test/lib/vedeu/coercers/editor_line_test.rb +12 -5
- data/test/lib/vedeu/common_test.rb +6 -0
- data/test/lib/vedeu/configuration/configuration_test.rb +0 -6
- data/test/lib/vedeu/error_test.rb +19 -9
- data/test/lib/vedeu/repositories/assemblage_test.rb +2 -2
- data/test/lib/vedeu/repositories/collection_test.rb +5 -2
- data/test/lib/vedeu/repositories/model_test.rb +16 -2
- data/test/lib/vedeu/repositories/registerable_test.rb +7 -2
- data/test/lib/vedeu/support/point_test.rb +6 -0
- data/test/test_helper.rb +0 -1
- metadata +26 -7
- data/lib/vedeu/distributed/test_application.rb +0 -117
- data/test/lib/vedeu/distributed/test_application_test.rb +0 -95
- data/test/support/helpers/model_test_class.rb +0 -74
data/integrations/dsl_app_012.rb
CHANGED
data/integrations/dsl_app_013.rb
CHANGED
data/integrations/dsl_app_014.rb
CHANGED
data/integrations/dsl_app_015.rb
CHANGED
data/integrations/dsl_app_016.rb
CHANGED
data/integrations/dsl_app_017.rb
CHANGED
data/integrations/dsl_app_018.rb
CHANGED
data/integrations/dsl_app_019.rb
CHANGED
data/integrations/dsl_app_020.rb
CHANGED
data/integrations/dsl_app_021.rb
CHANGED
data/integrations/dsl_app_022.rb
CHANGED
@@ -32,11 +32,11 @@ module Vedeu
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
# @note Client applications should implement this method.
|
36
|
+
#
|
35
37
|
# @macro raise_not_implemented
|
36
38
|
def render
|
37
|
-
raise Vedeu::Error::NotImplemented
|
38
|
-
'The subclass of Vedeu::ApplicationView must implement the ' \
|
39
|
-
'#render method.'
|
39
|
+
raise Vedeu::Error::NotImplemented
|
40
40
|
end
|
41
41
|
|
42
42
|
protected
|
@@ -14,32 +14,43 @@ module Vedeu
|
|
14
14
|
|
15
15
|
# @param (see #initialize)
|
16
16
|
# @return (see #coerce)
|
17
|
-
def self.coerce(value)
|
18
|
-
new(value).coerce
|
17
|
+
def self.coerce(value, attributes = {})
|
18
|
+
new(value, attributes).coerce
|
19
19
|
end
|
20
20
|
|
21
21
|
# Returns a new instance of the Vedeu::Coercers::Coercer
|
22
22
|
# subclass.
|
23
23
|
#
|
24
24
|
# @param value [void]
|
25
|
+
# @param attributes [Hash<Symbol => void>]
|
25
26
|
# @return [Vedeu::Coercers::Coercer]
|
26
|
-
def initialize(value)
|
27
|
-
@value
|
27
|
+
def initialize(value, attributes = {})
|
28
|
+
@value = value
|
29
|
+
@attributes = attributes
|
28
30
|
end
|
29
31
|
|
30
32
|
# @macro raise_not_implemented
|
31
33
|
def coerce
|
32
|
-
raise Vedeu::Error::NotImplemented
|
34
|
+
raise Vedeu::Error::NotImplemented
|
33
35
|
end
|
34
36
|
|
35
37
|
protected
|
36
38
|
|
39
|
+
# @!attribute [r] attributes
|
40
|
+
# @return [void]
|
41
|
+
attr_reader :attributes
|
42
|
+
|
37
43
|
# @!attribute [r] value
|
38
44
|
# @return [void]
|
39
45
|
attr_reader :value
|
40
46
|
|
41
47
|
private
|
42
48
|
|
49
|
+
# @macro raise_not_implemented
|
50
|
+
def child_klass
|
51
|
+
raise Vedeu::Error::NotImplemented
|
52
|
+
end
|
53
|
+
|
43
54
|
# @return [Boolean]
|
44
55
|
def coerced?
|
45
56
|
value.is_a?(klass)
|
@@ -53,7 +64,7 @@ module Vedeu
|
|
53
64
|
|
54
65
|
# @macro raise_not_implemented
|
55
66
|
def klass
|
56
|
-
raise Vedeu::Error::NotImplemented
|
67
|
+
raise Vedeu::Error::NotImplemented
|
57
68
|
end
|
58
69
|
|
59
70
|
end # Coercer
|
@@ -27,7 +27,7 @@ module Vedeu
|
|
27
27
|
klass.new(foreground: value)
|
28
28
|
|
29
29
|
elsif hash?(value)
|
30
|
-
klass.new(
|
30
|
+
klass.new(colour_attributes)
|
31
31
|
|
32
32
|
else
|
33
33
|
incoercible!
|
@@ -38,7 +38,7 @@ module Vedeu
|
|
38
38
|
private
|
39
39
|
|
40
40
|
# @return [Hash]
|
41
|
-
def
|
41
|
+
def colour_attributes
|
42
42
|
Vedeu::Coercers::ColourAttributes.coerce(value)
|
43
43
|
end
|
44
44
|
|
@@ -216,11 +216,14 @@ module Vedeu
|
|
216
216
|
end
|
217
217
|
|
218
218
|
# @macro raise_not_implemented
|
219
|
-
def
|
220
|
-
raise Vedeu::Error::NotImplemented
|
219
|
+
def named
|
220
|
+
raise Vedeu::Error::NotImplemented
|
221
|
+
end
|
222
|
+
|
223
|
+
# @macro raise_not_implemented
|
224
|
+
def repository
|
225
|
+
raise Vedeu::Error::NotImplemented
|
221
226
|
end
|
222
|
-
alias named not_implemented
|
223
|
-
alias repository not_implemented
|
224
227
|
|
225
228
|
# @return [Vedeu::Colours::Validator]
|
226
229
|
def validator
|
data/lib/vedeu/common.rb
CHANGED
@@ -104,95 +104,42 @@ module Vedeu
|
|
104
104
|
options[:drb_port] = port
|
105
105
|
end
|
106
106
|
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# Vedeu.configure do
|
110
|
-
# drb_height 25
|
111
|
-
# # ...
|
112
|
-
# end
|
113
|
-
#
|
107
|
+
# {include:file:docs/configuration/drb_height.md}
|
114
108
|
# @param height [Fixnum]
|
115
109
|
# @return [Fixnum]
|
116
110
|
def drb_height(height = 25)
|
117
111
|
options[:drb_height] = height
|
118
112
|
end
|
119
113
|
|
120
|
-
#
|
121
|
-
#
|
122
|
-
# Vedeu.configure do
|
123
|
-
# drb_width 80
|
124
|
-
# # ...
|
125
|
-
# end
|
126
|
-
#
|
114
|
+
# {include:file:docs/configuration/drb_width.md}
|
127
115
|
# @param width [Fixnum]
|
128
116
|
# @return [Fixnum]
|
129
117
|
def drb_width(width = 80)
|
130
118
|
options[:drb_width] = width
|
131
119
|
end
|
132
120
|
|
133
|
-
#
|
134
|
-
# `raw`. Also, see {Vedeu::Config::API#raw!}
|
135
|
-
#
|
136
|
-
# Vedeu.configure do
|
137
|
-
# cooked!
|
138
|
-
# # ...
|
139
|
-
# end
|
140
|
-
#
|
121
|
+
# {include:file:docs/configuration/cooked.md}
|
141
122
|
# @return [Boolean]
|
142
123
|
def cooked!
|
143
124
|
options[:terminal_mode] = :cooked
|
144
125
|
end
|
145
126
|
alias cooked cooked!
|
146
127
|
|
147
|
-
#
|
148
|
-
# `raw`.
|
149
|
-
#
|
150
|
-
# @example
|
151
|
-
# Vedeu.configure do
|
152
|
-
# fake!
|
153
|
-
# # ...
|
154
|
-
# end
|
155
|
-
#
|
128
|
+
# {include:file:docs/configuration/fake.md}
|
156
129
|
# @return [Boolean]
|
157
130
|
def fake!
|
158
131
|
options[:terminal_mode] = :fake
|
159
132
|
end
|
160
133
|
alias fake fake!
|
161
134
|
|
162
|
-
#
|
163
|
-
# `raw`. Also, see {Vedeu::Config::API#cooked!}
|
164
|
-
#
|
165
|
-
# Vedeu.configure do
|
166
|
-
# raw!
|
167
|
-
# # ...
|
168
|
-
# end
|
169
|
-
#
|
135
|
+
# {include:file:docs/configuration/raw.md}
|
170
136
|
# @return [Boolean]
|
171
137
|
def raw!
|
172
138
|
options[:terminal_mode] = :raw
|
173
139
|
end
|
174
140
|
alias raw raw!
|
175
141
|
|
176
|
-
#
|
177
|
-
# setting is for debugging to be disabled. Using `debug!` or
|
178
|
-
# setting `debug` to true will enable debugging.
|
179
|
-
#
|
180
|
-
# Enabling debugging will:
|
181
|
-
# - Enable `Vedeu::Logging::Timer` meaning various timing
|
182
|
-
# information is output to the log file.
|
183
|
-
# - Produce a full a backtrace to STDOUT and the log file upon
|
184
|
-
# unrecoverable error or unhandled exception.
|
185
|
-
#
|
186
|
-
# Vedeu.configure do
|
187
|
-
# debug!
|
188
|
-
# # ...
|
189
|
-
# end
|
190
|
-
#
|
191
|
-
# Vedeu.configure do
|
192
|
-
# debug false
|
193
|
-
# # ...
|
194
|
-
# end
|
195
|
-
#
|
142
|
+
# {include:file:docs/configuration/debug.md}
|
196
143
|
# @param value [Boolean]
|
197
144
|
# @return [Boolean]
|
198
145
|
def debug!(value = true)
|
@@ -200,20 +147,7 @@ module Vedeu
|
|
200
147
|
end
|
201
148
|
alias debug debug!
|
202
149
|
|
203
|
-
#
|
204
|
-
#
|
205
|
-
# Vedeu.configure do
|
206
|
-
# colour_mode 256
|
207
|
-
# # ...
|
208
|
-
# end
|
209
|
-
#
|
210
|
-
# @note
|
211
|
-
# iTerm 2 on Mac OSX will handle the true colour setting
|
212
|
-
# (16777216), whereas Terminator on Linux will not display
|
213
|
-
# colours correctly. For compatibility across platforms, it is
|
214
|
-
# recommended to either not set the colour mode at all and
|
215
|
-
# allow it to be detected, or use 256 here.
|
216
|
-
#
|
150
|
+
# {include:file:docs/configuration/colour_mode.md}
|
217
151
|
# @param value [Fixnum]
|
218
152
|
# @macro raise_invalid_syntax
|
219
153
|
# @return [Boolean]
|
@@ -226,18 +160,7 @@ module Vedeu
|
|
226
160
|
options[:colour_mode] = value
|
227
161
|
end
|
228
162
|
|
229
|
-
#
|
230
|
-
#
|
231
|
-
# Vedeu.configure do
|
232
|
-
# height 25
|
233
|
-
#
|
234
|
-
# # or...
|
235
|
-
#
|
236
|
-
# height = 25
|
237
|
-
#
|
238
|
-
# # ...
|
239
|
-
# end
|
240
|
-
#
|
163
|
+
# {include:file:docs/configuration/height.md}
|
241
164
|
# @param height [Fixnum]
|
242
165
|
# @return [Fixnum]
|
243
166
|
def height(height = 25)
|
@@ -245,21 +168,7 @@ module Vedeu
|
|
245
168
|
end
|
246
169
|
alias height= height
|
247
170
|
|
248
|
-
#
|
249
|
-
# By default, the log file is set to '/tmp/vedeu_bootstrap.log'.
|
250
|
-
#
|
251
|
-
# # Log messages will be sent to the path given.
|
252
|
-
# Vedeu.configure do
|
253
|
-
# log '/var/log/vedeu.log'
|
254
|
-
# # ...
|
255
|
-
# end
|
256
|
-
#
|
257
|
-
# # Log messages will be silently dropped.
|
258
|
-
# Vedeu.configure do
|
259
|
-
# log false
|
260
|
-
# # ...
|
261
|
-
# end
|
262
|
-
#
|
171
|
+
# {include:file:docs/configuration/log.md}
|
263
172
|
# @param filename_or_false [FalseClass|String]
|
264
173
|
# @return [NilClass|String]
|
265
174
|
def log(filename_or_false = false)
|
@@ -274,19 +183,7 @@ module Vedeu
|
|
274
183
|
end
|
275
184
|
end
|
276
185
|
|
277
|
-
#
|
278
|
-
# of message types can be found at
|
279
|
-
# {Vedeu::Configuration.log_types}.
|
280
|
-
#
|
281
|
-
# Vedeu.configure do
|
282
|
-
# log_except :debug, :event
|
283
|
-
#
|
284
|
-
# # or
|
285
|
-
# log_except [:debug, :info]
|
286
|
-
#
|
287
|
-
# # ...
|
288
|
-
# end
|
289
|
-
#
|
186
|
+
# {include:file:docs/configuration/log_except.md}
|
290
187
|
# @param types [Array<Symbol>] The message types which should
|
291
188
|
# not be logged.
|
292
189
|
# @return [Array<Symbol>]
|
@@ -294,18 +191,7 @@ module Vedeu
|
|
294
191
|
options[:log_except] = types.flatten
|
295
192
|
end
|
296
193
|
|
297
|
-
#
|
298
|
-
# types can be found at {Vedeu::Configuration.log_types}.
|
299
|
-
#
|
300
|
-
# Vedeu.configure do
|
301
|
-
# log_only :debug, :event
|
302
|
-
#
|
303
|
-
# # or
|
304
|
-
# log_only [:debug, :info]
|
305
|
-
#
|
306
|
-
# # ...
|
307
|
-
# end
|
308
|
-
#
|
194
|
+
# {include:file:docs/configuration/log_only.md}
|
309
195
|
# @param types [Array<Symbol>] The message types which should be
|
310
196
|
# logged.
|
311
197
|
# @return [Array<Symbol>]
|
@@ -313,29 +199,7 @@ module Vedeu
|
|
313
199
|
options[:log_only] = types.flatten
|
314
200
|
end
|
315
201
|
|
316
|
-
#
|
317
|
-
# setting is for profiling to be disabled. Using `profile!` or
|
318
|
-
# setting `profile` to true will enable profiling.
|
319
|
-
#
|
320
|
-
# Profile uses 'ruby-prof' to write a 'vedeu_profile' file to
|
321
|
-
# the /tmp directory which contains a call trace of the running
|
322
|
-
# application. Upon exit, this file can be examined to ascertain
|
323
|
-
# certain behaviours of Vedeu.
|
324
|
-
#
|
325
|
-
# @note
|
326
|
-
# Be aware that running an application with profiling enabled
|
327
|
-
# will affect performance.
|
328
|
-
#
|
329
|
-
# Vedeu.configure do
|
330
|
-
# profile!
|
331
|
-
# # ...
|
332
|
-
# end
|
333
|
-
#
|
334
|
-
# Vedeu.configure do
|
335
|
-
# profile false
|
336
|
-
# # ...
|
337
|
-
# end
|
338
|
-
#
|
202
|
+
# {include:file:docs/configuration/profile.md}
|
339
203
|
# @param value [Boolean]
|
340
204
|
# @return [Boolean]
|
341
205
|
def profile!(value = true)
|
@@ -343,20 +207,7 @@ module Vedeu
|
|
343
207
|
end
|
344
208
|
alias profile profile!
|
345
209
|
|
346
|
-
#
|
347
|
-
# the class method '.render' defined as this will be called when
|
348
|
-
# rendering content.
|
349
|
-
#
|
350
|
-
# Vedeu.configure do
|
351
|
-
# renderer MyRenderer
|
352
|
-
# # ...
|
353
|
-
# end
|
354
|
-
#
|
355
|
-
# Vedeu.configure do
|
356
|
-
# renderers MyRenderer, MyOtherRenderer
|
357
|
-
# # ...
|
358
|
-
# end
|
359
|
-
#
|
210
|
+
# {include:file:docs/configuration/renderer.md}
|
360
211
|
# @param renderer [Array<Class>|Class]
|
361
212
|
# @return [Array<Class>]
|
362
213
|
def renderer(*renderer)
|
@@ -364,96 +215,42 @@ module Vedeu
|
|
364
215
|
end
|
365
216
|
alias renderers renderer
|
366
217
|
|
367
|
-
#
|
368
|
-
# templates and other resources). By default the base path is
|
369
|
-
# just cwd but this will not work for many applications.
|
370
|
-
#
|
371
|
-
# Vedeu.configure do
|
372
|
-
# base_path '/path/to/application'
|
373
|
-
# # ...
|
374
|
-
# end
|
375
|
-
#
|
218
|
+
# {include:file:docs/configuration/base_path.md}
|
376
219
|
# @param path [String]
|
377
220
|
# @return [String]
|
378
221
|
def base_path(path = nil)
|
379
222
|
options[:base_path] = path
|
380
223
|
end
|
381
224
|
|
382
|
-
#
|
383
|
-
# this controller with action and optional arguments first.
|
384
|
-
#
|
385
|
-
# Vedeu.configure do
|
386
|
-
# root :controller, :action, args
|
387
|
-
# # ...
|
388
|
-
# end
|
389
|
-
#
|
225
|
+
# {include:file:docs/configuration/root.md}
|
390
226
|
# @param args [Array<Symbol|void>]
|
391
227
|
# @return [Class]
|
392
228
|
def root(*args)
|
393
229
|
options[:root] = args
|
394
230
|
end
|
395
231
|
|
396
|
-
#
|
397
|
-
#
|
398
|
-
# Vedeu.configure do
|
399
|
-
# stdin IO.console
|
400
|
-
# # ...
|
401
|
-
# end
|
402
|
-
#
|
232
|
+
# {include:file:docs/configuration/stdin.md}
|
403
233
|
# @param io [File|IO]
|
404
234
|
# @return [File|IO]
|
405
235
|
def stdin(io)
|
406
236
|
options[:stdin] = io
|
407
237
|
end
|
408
238
|
|
409
|
-
#
|
410
|
-
#
|
411
|
-
# Vedeu.configure do
|
412
|
-
# stdout IO.console
|
413
|
-
# # ...
|
414
|
-
# end
|
415
|
-
#
|
239
|
+
# {include:file:docs/configuration/stdout.md}
|
416
240
|
# @param io [File|IO]
|
417
241
|
# @return [File|IO]
|
418
242
|
def stdout(io)
|
419
243
|
options[:stdout] = io
|
420
244
|
end
|
421
245
|
|
422
|
-
#
|
423
|
-
#
|
424
|
-
# Vedeu.configure do
|
425
|
-
# stderr IO.console
|
426
|
-
# # ...
|
427
|
-
# end
|
428
|
-
#
|
246
|
+
# {include:file:docs/configuration/stderr.md}
|
429
247
|
# @param io [File|IO]
|
430
248
|
# @return [File|IO]
|
431
249
|
def stderr(io)
|
432
250
|
options[:stderr] = io
|
433
251
|
end
|
434
252
|
|
435
|
-
#
|
436
|
-
# to the terminal which improves redraw/render/refresh rate. By
|
437
|
-
# default it is enabled.
|
438
|
-
#
|
439
|
-
# Sets boolean to enable/disable compression. Vedeu's default
|
440
|
-
# setting is for compression to be enabled. Setting
|
441
|
-
# `compression` to false will disable compression.
|
442
|
-
#
|
443
|
-
# Vedeu.configure do
|
444
|
-
# compression! # enabled (default)
|
445
|
-
# # ...
|
446
|
-
# end
|
447
|
-
#
|
448
|
-
# Vedeu.configure do
|
449
|
-
# compression false
|
450
|
-
# # ...
|
451
|
-
# end
|
452
|
-
#
|
453
|
-
# @note
|
454
|
-
# - Be aware that running an application without compression
|
455
|
-
# will affect performance.
|
456
|
-
#
|
253
|
+
# {include:file:docs/configuration/compression.md}
|
457
254
|
# @param value [Boolean]
|
458
255
|
# @return [Boolean]
|
459
256
|
def compression(value = true)
|
@@ -461,29 +258,7 @@ module Vedeu
|
|
461
258
|
end
|
462
259
|
alias compression! compression
|
463
260
|
|
464
|
-
#
|
465
|
-
# ':fake' or :raw'.
|
466
|
-
#
|
467
|
-
# Vedeu.configure do
|
468
|
-
# terminal_mode :cooked
|
469
|
-
#
|
470
|
-
# # or...
|
471
|
-
#
|
472
|
-
# terminal_mode :fake
|
473
|
-
#
|
474
|
-
# # or...
|
475
|
-
#
|
476
|
-
# terminal_mode :raw
|
477
|
-
#
|
478
|
-
# # or...
|
479
|
-
#
|
480
|
-
# terminal_mode = :raw
|
481
|
-
# terminal_mode = :fake
|
482
|
-
# terminal_mode = :cooked
|
483
|
-
#
|
484
|
-
# # ... some code
|
485
|
-
# end
|
486
|
-
#
|
261
|
+
# {include:file:docs/configuration/terminal_mode.md}
|
487
262
|
# @param mode [Symbol] Either ':cooked', ':fake' or ':raw'.
|
488
263
|
# @macro raise_invalid_syntax
|
489
264
|
# @return [Symbol]
|
@@ -497,9 +272,7 @@ module Vedeu
|
|
497
272
|
end
|
498
273
|
alias terminal_mode= terminal_mode
|
499
274
|
|
500
|
-
#
|
501
|
-
# This can have a performance impact.
|
502
|
-
#
|
275
|
+
# {include:file:docs/configuration/threaded.md}
|
503
276
|
# @param boolean [Boolean]
|
504
277
|
# @return [Boolean]
|
505
278
|
def threaded(boolean)
|
@@ -507,18 +280,7 @@ module Vedeu
|
|
507
280
|
end
|
508
281
|
alias threaded= threaded
|
509
282
|
|
510
|
-
#
|
511
|
-
#
|
512
|
-
# Vedeu.configure do
|
513
|
-
# width 80
|
514
|
-
#
|
515
|
-
# # or...
|
516
|
-
#
|
517
|
-
# width = 80
|
518
|
-
#
|
519
|
-
# # ...
|
520
|
-
# end
|
521
|
-
#
|
283
|
+
# {include:file:docs/configuration/width.md}
|
522
284
|
# @param width [Fixnum]
|
523
285
|
# @return [Fixnum]
|
524
286
|
def width(width = 80)
|
@@ -544,13 +306,7 @@ module Vedeu
|
|
544
306
|
options[:foreground] = value
|
545
307
|
end
|
546
308
|
|
547
|
-
#
|
548
|
-
#
|
549
|
-
# Vedeu.configure do
|
550
|
-
# colour background: '#ff0000', foreground: '#ffff00'
|
551
|
-
# # ...
|
552
|
-
# end
|
553
|
-
#
|
309
|
+
# {include:file:docs/configuration/colour.md}
|
554
310
|
# @param attrs [Hash<Symbol => String>]
|
555
311
|
# @return [Hash<Symbol => void>]
|
556
312
|
def colour(attrs = {})
|
@@ -559,18 +315,7 @@ module Vedeu
|
|
559
315
|
options
|
560
316
|
end
|
561
317
|
|
562
|
-
#
|
563
|
-
#
|
564
|
-
# Vedeu.configure do
|
565
|
-
# mouse! # => same as `mouse true`
|
566
|
-
#
|
567
|
-
# # or...
|
568
|
-
# mouse true
|
569
|
-
#
|
570
|
-
# mouse false
|
571
|
-
#
|
572
|
-
# end
|
573
|
-
#
|
318
|
+
# {include:file:docs/configuration/mouse.md}
|
574
319
|
# @param value [Boolean]
|
575
320
|
# @return [Boolean]
|
576
321
|
def mouse!(value = true)
|