vedeu 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/TODO.md +8 -0
- data/docs/dsl/by_method/buffer_update.md +3 -1
- data/docs/dsl/by_method/buffer_write.md +3 -1
- data/docs/dsl/by_method/cursor.md +3 -1
- data/docs/dsl/by_method/cursors.md +3 -1
- data/docs/dsl/by_method/direct_write.md +3 -1
- data/docs/dsl/by_method/log_stderr.md +4 -1
- data/docs/dsl/by_method/log_stdout.md +4 -1
- data/docs/dsl/by_method/log_timestamp.md +7 -1
- data/docs/dsl/by_method/render_output.md +3 -1
- data/docs/events/by_name/{geometry_down.md → aliases/geometry_down.md} +0 -0
- data/docs/events/by_name/{geometry_left.md → aliases/geometry_left.md} +0 -0
- data/docs/events/by_name/{geometry_right.md → aliases/geometry_right.md} +0 -0
- data/docs/events/by_name/{geometry_up.md → aliases/geometry_up.md} +0 -0
- data/docs/events/by_name/cursor_down.md +5 -0
- data/docs/events/by_name/cursor_left.md +3 -0
- data/docs/events/by_name/cursor_origin.md +3 -0
- data/docs/events/by_name/cursor_right.md +5 -0
- data/docs/events/by_name/cursor_top.md +3 -0
- data/docs/events/by_name/cursor_up.md +3 -0
- data/docs/events/by_name/hide_cursor.md +6 -1
- data/docs/events/by_name/maximise.md +2 -3
- data/docs/events/by_name/show_cursor.md +6 -1
- data/docs/events/by_name/unmaximise.md +5 -3
- data/docs/events/by_name/view_down.md +8 -0
- data/docs/events/by_name/view_left.md +8 -0
- data/docs/events/by_name/view_right.md +8 -0
- data/docs/events/by_name/view_up.md +8 -0
- data/docs/events/document.md +2 -1
- data/docs/events/focus.md +2 -1
- data/docs/events/menu.md +2 -1
- data/docs/events/movement.md +2 -1
- data/docs/events/refresh.md +2 -1
- data/docs/events/view.md +2 -1
- data/docs/events/visibility.md +2 -1
- data/examples/dsl_horizontal_alignment.rb +1 -1
- data/examples/dsl_vertical_alignment.rb +1 -1
- data/integrations/dsl_app_border_001.rb +63 -0
- data/integrations/dsl_app_border_002.rb +63 -0
- data/integrations/dsl_app_border_003.rb +63 -0
- data/integrations/dsl_app_border_004.rb +63 -0
- data/integrations/dsl_app_border_005.rb +63 -0
- data/integrations/expected/dsl_app_border_001.out +1 -0
- data/integrations/expected/dsl_app_border_002.out +1 -0
- data/integrations/expected/dsl_app_border_003.out +1 -0
- data/integrations/expected/dsl_app_border_004.out +1 -0
- data/integrations/expected/dsl_app_border_005.out +1 -0
- data/integrations/test_runner.sh +7 -0
- data/lib/vedeu.rb +2 -1
- data/lib/vedeu/borders/repository.rb +1 -5
- data/lib/vedeu/cursors/cursor.rb +29 -70
- data/lib/vedeu/cursors/move.rb +11 -4
- data/lib/vedeu/cursors/reposition.rb +2 -2
- data/lib/vedeu/cursors/repository.rb +7 -12
- data/lib/vedeu/dsl/elements.rb +0 -1
- data/lib/vedeu/error.rb +17 -5
- data/lib/vedeu/geometries/dsl/dsl.rb +2 -28
- data/lib/vedeu/geometries/dsl/grid.rb +2 -0
- data/lib/vedeu/geometries/geometry.rb +2 -22
- data/lib/vedeu/geometries/move.rb +45 -10
- data/lib/vedeu/geometries/repository.rb +0 -20
- data/lib/vedeu/input/capture.rb +2 -1
- data/lib/vedeu/logging/log.rb +25 -25
- data/lib/vedeu/renderers/file.rb +0 -5
- data/lib/vedeu/renderers/json.rb +1 -1
- data/lib/vedeu/renderers/options.rb +3 -1
- data/lib/vedeu/renderers/text.rb +0 -7
- data/lib/vedeu/runtime/bootstrap.rb +1 -1
- data/lib/vedeu/runtime/launcher.rb +8 -5
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/application/application_controller_test.rb +2 -4
- data/test/lib/vedeu/cursors/cursor_test.rb +9 -12
- data/test/lib/vedeu/cursors/move_test.rb +7 -3
- data/test/lib/vedeu/geometries/move_test.rb +22 -9
- data/test/lib/vedeu/interfaces/interface_test.rb +71 -73
- data/test/lib/vedeu/logging/log_test.rb +1 -1
- data/test/lib/vedeu/runtime/launcher_test.rb +5 -4
- data/test/support/examples/material_colours_app.rb +59 -8
- data/test/test_helper.rb +1 -0
- metadata +16 -6
@@ -67,8 +67,8 @@ module Vedeu
|
|
67
67
|
|
68
68
|
# Determine correct x and y related coordinates.
|
69
69
|
#
|
70
|
-
# @param offset []
|
71
|
-
# @param type []
|
70
|
+
# @param offset [Fixnum]
|
71
|
+
# @param type [Symbol]
|
72
72
|
# @return [Vedeu::Cursors::Coordinate]
|
73
73
|
def coordinate(offset, type)
|
74
74
|
Vedeu::Cursors::Coordinate.new(name: name,
|
@@ -12,11 +12,7 @@ module Vedeu
|
|
12
12
|
|
13
13
|
class << self
|
14
14
|
|
15
|
-
#
|
16
|
-
#
|
17
|
-
# @example
|
18
|
-
# Vedeu.cursor
|
19
|
-
#
|
15
|
+
# {include:file:docs/dsl/by_method/cursor.md}
|
20
16
|
# @return [NilClass|Vedeu::Cursors::Cursor]
|
21
17
|
def cursor
|
22
18
|
cursors.by_name
|
@@ -37,17 +33,16 @@ module Vedeu
|
|
37
33
|
|
38
34
|
end # Cursors
|
39
35
|
|
40
|
-
#
|
41
|
-
#
|
42
|
-
# @example
|
43
|
-
# Vedeu.cursors
|
44
|
-
#
|
36
|
+
# {include:file:docs/dsl/by_method/cursors.md}
|
45
37
|
# @!method cursors
|
46
38
|
# @return [Vedeu::Cursors::Repository]
|
39
|
+
def_delegators Vedeu::Cursors::Repository,
|
40
|
+
:cursors
|
41
|
+
|
42
|
+
# {include:file:docs/dsl/by_method/cursor.md}
|
47
43
|
# @!method cursor
|
48
44
|
# @see Vedeu::Cursors::Repository.cursor
|
49
45
|
def_delegators Vedeu::Cursors::Repository,
|
50
|
-
:cursor
|
51
|
-
:cursors
|
46
|
+
:cursor
|
52
47
|
|
53
48
|
end # Vedeu
|
data/lib/vedeu/dsl/elements.rb
CHANGED
data/lib/vedeu/error.rb
CHANGED
@@ -24,11 +24,18 @@ module Vedeu
|
|
24
24
|
end # ControllerNotFound
|
25
25
|
|
26
26
|
# Raised when Vedeu encounters an error it cannot recover from.
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
27
|
+
# Generally, all Vedeu exceptions are fatal- however, fatal here
|
28
|
+
# means that it is not known how to recover from an error.
|
29
|
+
#
|
30
|
+
# If you encounter a `Vedeu::Error::Fatal` error and the error
|
31
|
+
# message is insufficient to help you, please raise an issue so
|
32
|
+
# that we can attempt to accommodate your intentions.
|
33
|
+
#
|
34
|
+
# An example of this would happen if there was no interfaces, or
|
35
|
+
# specifically if there were no entries in {Vedeu::Models::Focus},
|
36
|
+
# since the fallback for most of the system when a name is not
|
37
|
+
# given or cannot be found is to use the name of the currently
|
38
|
+
# focussed interface.
|
32
39
|
#
|
33
40
|
class Fatal < StandardError
|
34
41
|
|
@@ -105,6 +112,11 @@ module Vedeu
|
|
105
112
|
#
|
106
113
|
# @see Vedeu::Geometries::Grid
|
107
114
|
#
|
115
|
+
# @!macro [new] raise_out_of_range
|
116
|
+
# @raise [Vedeu::Error::OutOfRange] When the value given for
|
117
|
+
# an argument or parameter cannot be used because it is
|
118
|
+
# outside the allowed range.
|
119
|
+
#
|
108
120
|
class OutOfRange < StandardError
|
109
121
|
|
110
122
|
# Returns an error message.
|
@@ -139,10 +139,6 @@ module Vedeu
|
|
139
139
|
# # ... some code
|
140
140
|
# end
|
141
141
|
#
|
142
|
-
# @note
|
143
|
-
# Vedeu.width in the example above will set the width to the
|
144
|
-
# default width of the terminal, this can be substituted for
|
145
|
-
# your own positive integer.
|
146
142
|
# @param height [Fixnum] The number of lines/rows.
|
147
143
|
# @return [Vedeu::Geometries::Geometry]
|
148
144
|
def align_bottom(height = nil)
|
@@ -166,10 +162,6 @@ module Vedeu
|
|
166
162
|
#
|
167
163
|
# # Also allows `align_center` if preferred.
|
168
164
|
#
|
169
|
-
# @note
|
170
|
-
# Vedeu.height in the example above will set the height to the
|
171
|
-
# default height of the terminal, this can be substituted for
|
172
|
-
# your own positive integer.
|
173
165
|
# @param width [Fixnum] The number of characters/columns.
|
174
166
|
# @return [Vedeu::Geometries::Geometry]
|
175
167
|
def align_centre(width = nil)
|
@@ -192,10 +184,6 @@ module Vedeu
|
|
192
184
|
# # ... some code
|
193
185
|
# end
|
194
186
|
#
|
195
|
-
# @note
|
196
|
-
# Vedeu.height in the example above will set the height to the
|
197
|
-
# default height of the terminal, this can be substituted for
|
198
|
-
# your own positive integer.
|
199
187
|
# @param width [Fixnum] The number of characters/columns.
|
200
188
|
# @return [Vedeu::Geometries::Geometry]
|
201
189
|
def align_left(width = nil)
|
@@ -218,10 +206,6 @@ module Vedeu
|
|
218
206
|
# # ... some code
|
219
207
|
# end
|
220
208
|
#
|
221
|
-
# @note
|
222
|
-
# Vedeu.width in the example above will set the width to the
|
223
|
-
# default width of the terminal, this can be substituted for
|
224
|
-
# your own positive integer.
|
225
209
|
# @param height [Fixnum] The number of lines/rows.
|
226
210
|
# @return [Vedeu::Geometries::Geometry]
|
227
211
|
def align_middle(height = nil)
|
@@ -243,10 +227,6 @@ module Vedeu
|
|
243
227
|
# # ... some code
|
244
228
|
# end
|
245
229
|
#
|
246
|
-
# @note
|
247
|
-
# Vedeu.height in the example above will set the height to the
|
248
|
-
# default height of the terminal, this can be substituted for
|
249
|
-
# your own positive integer.
|
250
230
|
# @param width [Fixnum] The number of characters/columns.
|
251
231
|
# @return [Vedeu::Geometries::Geometry]
|
252
232
|
def align_right(width = nil)
|
@@ -269,10 +249,6 @@ module Vedeu
|
|
269
249
|
# # ... some code
|
270
250
|
# end
|
271
251
|
#
|
272
|
-
# @note
|
273
|
-
# Vedeu.width in the example above will set the width to the
|
274
|
-
# default width of the terminal, this can be substituted for
|
275
|
-
# your own positive integer.
|
276
252
|
# @param height [Fixnum] The number of lines/rows.
|
277
253
|
# @return [Vedeu::Geometries::Geometry]
|
278
254
|
def align_top(height = nil)
|
@@ -291,8 +267,7 @@ module Vedeu
|
|
291
267
|
# end
|
292
268
|
#
|
293
269
|
# @param value [Fixnum]
|
294
|
-
# @
|
295
|
-
# not between 1 and 12 inclusive.
|
270
|
+
# @macro raise_out_of_range
|
296
271
|
# @return [Fixnum|Vedeu::Error::OutOfRange]
|
297
272
|
def columns(value)
|
298
273
|
Vedeu::Geometries::Grid.columns(value)
|
@@ -325,8 +300,7 @@ module Vedeu
|
|
325
300
|
# end
|
326
301
|
#
|
327
302
|
# @param value [Fixnum]
|
328
|
-
# @
|
329
|
-
# not between 1 and 12 inclusive.
|
303
|
+
# @macro raise_out_of_range
|
330
304
|
# @return [Fixnum]
|
331
305
|
def rows(value)
|
332
306
|
Vedeu::Geometries::Grid.rows(value)
|
@@ -33,6 +33,7 @@ module Vedeu
|
|
33
33
|
@value = value
|
34
34
|
end
|
35
35
|
|
36
|
+
# @macro raise_out_of_range
|
36
37
|
# @see Vedeu::Geometries::DSL#columns
|
37
38
|
def columns
|
38
39
|
fail Vedeu::Error::OutOfRange if out_of_range?
|
@@ -40,6 +41,7 @@ module Vedeu
|
|
40
41
|
column * value
|
41
42
|
end
|
42
43
|
|
44
|
+
# @macro raise_out_of_range
|
43
45
|
# @see Vedeu::Geometries::DSL#rows
|
44
46
|
def rows
|
45
47
|
fail Vedeu::Error::OutOfRange if out_of_range?
|
@@ -147,12 +147,7 @@ module Vedeu
|
|
147
147
|
end
|
148
148
|
alias == eql?
|
149
149
|
|
150
|
-
#
|
151
|
-
# occupy all of the available space on the terminal window.
|
152
|
-
#
|
153
|
-
# @example
|
154
|
-
# Vedeu.trigger(:_maximise_, name)
|
155
|
-
#
|
150
|
+
# {include:file:docs/events/by_name/maximise.md}
|
156
151
|
# @return [Vedeu::Geometries::Geometry|NilClass]
|
157
152
|
def maximise
|
158
153
|
return self if maximised?
|
@@ -165,15 +160,7 @@ module Vedeu
|
|
165
160
|
end
|
166
161
|
end
|
167
162
|
|
168
|
-
#
|
169
|
-
# a geometry was maximised, then triggering the unmaximise event
|
170
|
-
# will return it to its usual defined size (terminal size
|
171
|
-
# permitting: when the terminal has been resized, then the new
|
172
|
-
# geometry size should adapt).
|
173
|
-
#
|
174
|
-
# @example
|
175
|
-
# Vedeu.trigger(:_unmaximise_, name)
|
176
|
-
#
|
163
|
+
# {include:file:docs/events/by_name/unmaximise.md}
|
177
164
|
# @return [Vedeu::Geometries::Geometry|NilClass]
|
178
165
|
def unmaximise
|
179
166
|
return self unless maximised?
|
@@ -183,18 +170,11 @@ module Vedeu
|
|
183
170
|
store do
|
184
171
|
Vedeu.trigger(:_clear_)
|
185
172
|
Vedeu.trigger(:_refresh_)
|
186
|
-
Vedeu.trigger(:_refresh_view_, name)
|
187
173
|
end
|
188
174
|
end
|
189
175
|
|
190
176
|
private
|
191
177
|
|
192
|
-
# @todo Investigate the differences between memoizing this and
|
193
|
-
# not memoizing. Memoizing saves ~80ms on running test suite
|
194
|
-
# and considerably impacts app responsiveness, however changes
|
195
|
-
# to the geometry (such as movement or maximising) are not
|
196
|
-
# reflected. (GL: 2016-01-11)
|
197
|
-
#
|
198
178
|
# @return [Vedeu::Geometries::Area]
|
199
179
|
def area
|
200
180
|
Vedeu::Geometries::Area.from_attributes(area_attributes)
|
@@ -41,7 +41,7 @@ module Vedeu
|
|
41
41
|
|
42
42
|
Vedeu::Geometries::Geometry.store(new_attributes) do
|
43
43
|
update_cursor!
|
44
|
-
|
44
|
+
Vedeu.trigger(:_movement_refresh_, name)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -87,7 +87,7 @@ module Vedeu
|
|
87
87
|
end
|
88
88
|
|
89
89
|
# @return [Hash<Symbol => Symbol>]
|
90
|
-
def
|
90
|
+
def cursor_event
|
91
91
|
{
|
92
92
|
down: :_cursor_down_,
|
93
93
|
left: :_cursor_left_,
|
@@ -129,13 +129,6 @@ module Vedeu
|
|
129
129
|
}
|
130
130
|
end
|
131
131
|
|
132
|
-
# Refresh the screen after moving.
|
133
|
-
#
|
134
|
-
# @return [void]
|
135
|
-
def refresh!
|
136
|
-
Vedeu.trigger(:_movement_refresh_, name)
|
137
|
-
end
|
138
|
-
|
139
132
|
# Moves the geometry right by the offset.
|
140
133
|
#
|
141
134
|
# @return [Hash<Symbol => Fixnum]
|
@@ -169,7 +162,13 @@ module Vedeu
|
|
169
162
|
#
|
170
163
|
# @return [void]
|
171
164
|
def update_cursor!
|
172
|
-
|
165
|
+
if direction == :origin
|
166
|
+
Vedeu.trigger(cursor_event, name)
|
167
|
+
|
168
|
+
else
|
169
|
+
Vedeu.trigger(cursor_event, name, 0)
|
170
|
+
|
171
|
+
end
|
173
172
|
end
|
174
173
|
|
175
174
|
# @return [Boolean]
|
@@ -207,4 +206,40 @@ module Vedeu
|
|
207
206
|
|
208
207
|
end # Geometries
|
209
208
|
|
209
|
+
# :nocov:
|
210
|
+
|
211
|
+
# {include:file:docs/events/by_name/movement_refresh.md}
|
212
|
+
Vedeu.bind(:_movement_refresh_) do |name|
|
213
|
+
Vedeu.trigger(:_clear_)
|
214
|
+
Vedeu.trigger(:_refresh_)
|
215
|
+
Vedeu.trigger(:_clear_view_, name)
|
216
|
+
Vedeu.trigger(:_refresh_view_, name)
|
217
|
+
end
|
218
|
+
|
219
|
+
# {include:file:docs/events/by_name/view_down.md}
|
220
|
+
Vedeu.bind(:_view_down_) do |name, offset|
|
221
|
+
Vedeu::Geometries::Move.move(name: name, offset: offset, direction: :down)
|
222
|
+
end
|
223
|
+
|
224
|
+
# {include:file:docs/events/by_name/view_left.md}
|
225
|
+
Vedeu.bind(:_view_left_) do |name, offset|
|
226
|
+
Vedeu::Geometries::Move.move(name: name, offset: offset, direction: :left)
|
227
|
+
end
|
228
|
+
|
229
|
+
# {include:file:docs/events/by_name/view_right.md}
|
230
|
+
Vedeu.bind(:_view_right_) do |name, offset|
|
231
|
+
Vedeu::Geometries::Move.move(name: name, offset: offset, direction: :right)
|
232
|
+
end
|
233
|
+
|
234
|
+
# {include:file:docs/events/by_name/view_up.md}
|
235
|
+
Vedeu.bind(:_view_up_) do |name, offset|
|
236
|
+
Vedeu::Geometries::Move.move(name: name, offset: offset, direction: :up)
|
237
|
+
end
|
238
|
+
|
239
|
+
[:down, :left, :right, :up].each do |direction|
|
240
|
+
Vedeu.bind_alias(:"_geometry_#{direction}_", :"_view_#{direction}_")
|
241
|
+
end
|
242
|
+
|
243
|
+
# :nocov:
|
244
|
+
|
210
245
|
end # Vedeu
|
@@ -35,31 +35,11 @@ module Vedeu
|
|
35
35
|
Vedeu.geometries.by_name(name).maximise
|
36
36
|
end
|
37
37
|
|
38
|
-
# See {file:docs/events/view.md#\_movement_refresh_}
|
39
|
-
Vedeu.bind(:_movement_refresh_) do |name|
|
40
|
-
Vedeu.trigger(:_clear_)
|
41
|
-
Vedeu.trigger(:_refresh_)
|
42
|
-
Vedeu.trigger(:_clear_view_, name)
|
43
|
-
Vedeu.trigger(:_refresh_view_, name)
|
44
|
-
end
|
45
|
-
|
46
38
|
# See {file:docs/events/view.md#\_unmaximise_}
|
47
39
|
Vedeu.bind(:_unmaximise_) do |name|
|
48
40
|
Vedeu.geometries.by_name(name).unmaximise
|
49
41
|
end
|
50
42
|
|
51
|
-
[:down, :left, :right, :up].each do |direction|
|
52
|
-
Vedeu.bind(:"_view_#{direction}_") do |name, offset|
|
53
|
-
Vedeu::Geometries::Move.move(direction: direction,
|
54
|
-
name: name,
|
55
|
-
offset: offset)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
[:down, :left, :right, :up].each do |direction|
|
60
|
-
Vedeu.bind_alias(:"_geometry_#{direction}_", :"_view_#{direction}_")
|
61
|
-
end
|
62
|
-
|
63
43
|
# :nocov:
|
64
44
|
|
65
45
|
end # Vedeu
|
data/lib/vedeu/input/capture.rb
CHANGED
data/lib/vedeu/logging/log.rb
CHANGED
@@ -6,6 +6,12 @@ module Vedeu
|
|
6
6
|
|
7
7
|
# Provides the ability to log anything to the Vedeu log file.
|
8
8
|
#
|
9
|
+
# @!macro [new] vedeu_logging_log_param_message
|
10
|
+
# @param message [String] The message you wish to emit, useful
|
11
|
+
# for debugging.
|
12
|
+
#
|
13
|
+
# @api public
|
14
|
+
#
|
9
15
|
class Log
|
10
16
|
|
11
17
|
class << self
|
@@ -16,8 +22,7 @@ module Vedeu
|
|
16
22
|
# Vedeu.log(type: :debug,
|
17
23
|
# message: 'A useful debugging message: Error!')
|
18
24
|
#
|
19
|
-
# @
|
20
|
-
# log file, useful for debugging.
|
25
|
+
# @macro vedeu_logging_log_param_message
|
21
26
|
# @param force [Boolean] When evaluates to true will attempt
|
22
27
|
# to write to the log file regardless of the Configuration
|
23
28
|
# setting.
|
@@ -33,29 +38,29 @@ module Vedeu
|
|
33
38
|
end
|
34
39
|
end
|
35
40
|
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# @
|
39
|
-
#
|
40
|
-
#
|
41
|
+
# {include:file:docs/dsl/by_method/log_stdout.md}
|
42
|
+
# @macro vedeu_logging_log_param_message
|
43
|
+
# @param type [Symbol] See {Vedeu::Logging::Log.message_types}
|
44
|
+
# for valid values.
|
41
45
|
# @return [String]
|
42
|
-
def log_stdout(type: :info
|
46
|
+
def log_stdout(message:, type: :info)
|
47
|
+
log(message: message, type: type)
|
48
|
+
|
43
49
|
$stdout.puts log_entry(type, message)
|
44
50
|
end
|
45
51
|
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# @
|
49
|
-
#
|
50
|
-
#
|
52
|
+
# {include:file:docs/dsl/by_method/log_stderr.md}
|
53
|
+
# @macro vedeu_logging_log_param_message
|
54
|
+
# @param type [Symbol] See {Vedeu::Logging::Log.message_types}
|
55
|
+
# for valid values.
|
51
56
|
# @return [String]
|
52
|
-
def log_stderr(type: :
|
57
|
+
def log_stderr(message:, type: :error)
|
58
|
+
log(message: message, type: type)
|
59
|
+
|
53
60
|
$stderr.puts log_entry(type, message)
|
54
61
|
end
|
55
62
|
|
56
|
-
#
|
57
|
-
# eg. [137.7824]
|
58
|
-
#
|
63
|
+
# {include:file:docs/dsl/by_method/log_timestamp.md}
|
59
64
|
# @return [String]
|
60
65
|
def timestamp
|
61
66
|
@now = Vedeu.clock_time
|
@@ -82,12 +87,8 @@ module Vedeu
|
|
82
87
|
end
|
83
88
|
end
|
84
89
|
|
85
|
-
#
|
86
|
-
#
|
87
|
-
# [ 0.0987] [debug] Something happened.
|
88
|
-
#
|
89
|
-
# @param message [String] The message type and message
|
90
|
-
# coloured and combined.
|
90
|
+
# {include:file:docs/api/by_method/log_timestamp.md}
|
91
|
+
# @macro vedeu_logging_log_param_message
|
91
92
|
# @return [String]
|
92
93
|
def formatted_message(message)
|
93
94
|
"#{timestamp}#{message}\n" if message
|
@@ -98,8 +99,7 @@ module Vedeu
|
|
98
99
|
# [type] message
|
99
100
|
#
|
100
101
|
# @param type [Symbol] The type of log message.
|
101
|
-
# @
|
102
|
-
# log file, useful for debugging.
|
102
|
+
# @macro vedeu_logging_log_param_message
|
103
103
|
# @return [String]
|
104
104
|
def log_entry(type, message)
|
105
105
|
colours = message_types.fetch(type, [:default, :default])
|