vedeu 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/.travis.yml +1 -1
- data/README.md +2 -6
- data/config/rubocop_enabled.yml +0 -6
- data/docs/dsl/by_method/clock_time.md +4 -1
- data/lib/vedeu/application/application_controller.rb +2 -2
- data/lib/vedeu/application/controller.rb +3 -3
- data/lib/vedeu/borders/border.rb +6 -6
- data/lib/vedeu/borders/dsl.rb +26 -26
- data/lib/vedeu/borders/refresh.rb +2 -2
- data/lib/vedeu/borders/title.rb +4 -4
- data/lib/vedeu/buffers/refresh.rb +8 -7
- data/lib/vedeu/buffers/terminal.rb +1 -1
- data/lib/vedeu/buffers/view.rb +2 -2
- data/lib/vedeu/cells/clear.rb +1 -1
- data/lib/vedeu/cells/cursor.rb +6 -6
- data/lib/vedeu/cells/empty.rb +2 -2
- data/lib/vedeu/cells/escape.rb +6 -6
- data/lib/vedeu/coercers/alignment.rb +1 -1
- data/lib/vedeu/coercers/colour_attributes.rb +8 -16
- data/lib/vedeu/colours/background.rb +4 -8
- data/lib/vedeu/colours/colour.rb +4 -4
- data/lib/vedeu/colours/foreground.rb +4 -8
- data/lib/vedeu/colours/repository.rb +1 -1
- data/lib/vedeu/colours/translator.rb +6 -6
- data/lib/vedeu/common.rb +1 -1
- data/lib/vedeu/configuration/api.rb +15 -15
- data/lib/vedeu/configuration/configuration.rb +8 -8
- data/lib/vedeu/cursors/coordinate.rb +4 -4
- data/lib/vedeu/cursors/cursor.rb +2 -2
- data/lib/vedeu/distributed/client.rb +2 -2
- data/lib/vedeu/distributed/server.rb +8 -10
- data/lib/vedeu/distributed/subprocess.rb +1 -1
- data/lib/vedeu/distributed/uri.rb +1 -1
- data/lib/vedeu/dsl/cursors.rb +2 -2
- data/lib/vedeu/dsl/elements.rb +5 -5
- data/lib/vedeu/dsl/helpers/align.rb +1 -1
- data/lib/vedeu/dsl/helpers/attributes.rb +1 -1
- data/lib/vedeu/dsl/presentation.rb +15 -15
- data/lib/vedeu/dsl/view.rb +1 -1
- data/lib/vedeu/dsl/views.rb +1 -1
- data/lib/vedeu/editor/cursor.rb +1 -1
- data/lib/vedeu/editor/line.rb +2 -2
- data/lib/vedeu/editor/lines.rb +2 -2
- data/lib/vedeu/esc/borders.rb +19 -19
- data/lib/vedeu/esc/colours.rb +1 -1
- data/lib/vedeu/events/aliases.rb +3 -15
- data/lib/vedeu/events/event.rb +14 -14
- data/lib/vedeu/events/repository.rb +1 -1
- data/lib/vedeu/geometries/area/area.rb +5 -5
- data/lib/vedeu/geometries/area/dimension.rb +1 -1
- data/lib/vedeu/geometries/dsl/dsl.rb +7 -7
- data/lib/vedeu/geometries/geometry.rb +2 -2
- data/lib/vedeu/geometries/position.rb +6 -6
- data/lib/vedeu/groups/clear.rb +2 -2
- data/lib/vedeu/groups/group.rb +2 -2
- data/lib/vedeu/input/dsl.rb +1 -1
- data/lib/vedeu/input/key.rb +3 -3
- data/lib/vedeu/input/mapper.rb +2 -2
- data/lib/vedeu/input/read.rb +2 -4
- data/lib/vedeu/input/store.rb +1 -17
- data/lib/vedeu/input/translator.rb +49 -45
- data/lib/vedeu/interfaces/clear.rb +3 -3
- data/lib/vedeu/interfaces/dsl.rb +4 -4
- data/lib/vedeu/interfaces/interface.rb +2 -2
- data/lib/vedeu/logging/clock_time.rb +3 -3
- data/lib/vedeu/logging/debug.rb +14 -6
- data/lib/vedeu/logging/log.rb +1 -1
- data/lib/vedeu/menus/dsl.rb +2 -2
- data/lib/vedeu/menus/menu.rb +9 -9
- data/lib/vedeu/models/focus.rb +11 -11
- data/lib/vedeu/models/page.rb +1 -1
- data/lib/vedeu/models/row.rb +1 -1
- data/lib/vedeu/models/toggleable.rb +7 -7
- data/lib/vedeu/null/generic.rb +29 -29
- data/lib/vedeu/output/compressor_cache.rb +1 -11
- data/lib/vedeu/output/viewport.rb +4 -12
- data/lib/vedeu/output/write.rb +3 -3
- data/lib/vedeu/plugins/plugin.rb +1 -1
- data/lib/vedeu/presentation/colour.rb +1 -1
- data/lib/vedeu/presentation/presentation.rb +1 -1
- data/lib/vedeu/presentation/style.rb +4 -4
- data/lib/vedeu/renderers/all.rb +1 -14
- data/lib/vedeu/renderers/options.rb +1 -1
- data/lib/vedeu/repositories/all.rb +1 -0
- data/lib/vedeu/repositories/assemblage.rb +1 -1
- data/lib/vedeu/repositories/collection.rb +4 -4
- data/lib/vedeu/repositories/registerable.rb +2 -2
- data/lib/vedeu/repositories/repositories.rb +1 -1
- data/lib/vedeu/repositories/repository.rb +3 -3
- data/lib/vedeu/repositories/storage.rb +38 -0
- data/lib/vedeu/repositories/store.rb +5 -22
- data/lib/vedeu/runtime/application.rb +1 -1
- data/lib/vedeu/runtime/flags.rb +3 -3
- data/lib/vedeu/runtime/router.rb +3 -18
- data/lib/vedeu/templating/helpers.rb +5 -3
- data/lib/vedeu/templating/view_template.rb +26 -18
- data/lib/vedeu/terminal/terminal.rb +5 -5
- data/lib/vedeu/version.rb +1 -1
- data/lib/vedeu/views/chars.rb +1 -1
- data/lib/vedeu/views/composition.rb +4 -4
- data/lib/vedeu/views/default_attributes.rb +2 -2
- data/lib/vedeu/views/line.rb +6 -6
- data/lib/vedeu/views/lines.rb +1 -1
- data/lib/vedeu/views/stream.rb +6 -6
- data/lib/vedeu/views/streams.rb +1 -1
- data/lib/vedeu/views/view.rb +4 -4
- data/test/lib/vedeu/borders/border_test.rb +1 -1
- data/test/lib/vedeu/borders/caption_test.rb +1 -1
- data/test/lib/vedeu/borders/dsl_test.rb +2 -3
- data/test/lib/vedeu/borders/refresh_test.rb +1 -1
- data/test/lib/vedeu/borders/title_test.rb +1 -1
- data/test/lib/vedeu/buffers/buffer_test.rb +7 -7
- data/test/lib/vedeu/buffers/refresh_test.rb +1 -1
- data/test/lib/vedeu/colours/background_test.rb +27 -0
- data/test/lib/vedeu/colours/foreground_test.rb +27 -0
- data/test/lib/vedeu/cursors/cursor_test.rb +3 -3
- data/test/lib/vedeu/cursors/move_test.rb +1 -1
- data/test/lib/vedeu/cursors/refresh_test.rb +1 -1
- data/test/lib/vedeu/cursors/reposition_test.rb +2 -2
- data/test/lib/vedeu/dsl/view_test.rb +6 -8
- data/test/lib/vedeu/editor/cropper_test.rb +1 -1
- data/test/lib/vedeu/editor/cursor_test.rb +1 -1
- data/test/lib/vedeu/editor/document_test.rb +1 -1
- data/test/lib/vedeu/editor/editor_test.rb +1 -1
- data/test/lib/vedeu/events/aliases_test.rb +0 -14
- data/test/lib/vedeu/geometries/area/area_test.rb +1 -1
- data/test/lib/vedeu/geometries/geometry_test.rb +1 -1
- data/test/lib/vedeu/geometries/move_test.rb +1 -1
- data/test/lib/vedeu/groups/clear_test.rb +1 -1
- data/test/lib/vedeu/groups/dsl_test.rb +1 -1
- data/test/lib/vedeu/groups/group_test.rb +1 -1
- data/test/lib/vedeu/groups/refresh_test.rb +1 -1
- data/test/lib/vedeu/input/capture_test.rb +2 -2
- data/test/lib/vedeu/input/store_test.rb +0 -34
- data/test/lib/vedeu/interfaces/clear_test.rb +1 -1
- data/test/lib/vedeu/interfaces/dsl_test.rb +4 -4
- data/test/lib/vedeu/interfaces/interface_test.rb +1 -1
- data/test/lib/vedeu/menus/dsl_test.rb +1 -1
- data/test/lib/vedeu/null/generic_test.rb +1 -1
- data/test/lib/vedeu/output/compressor_cache_test.rb +0 -33
- data/test/lib/vedeu/renderers/all_test.rb +0 -8
- data/test/lib/vedeu/repositories/repository_test.rb +2 -2
- data/test/lib/vedeu/repositories/storage_test.rb +74 -0
- data/test/lib/vedeu/repositories/store_test.rb +10 -28
- data/test/lib/vedeu/runtime/router_test.rb +0 -8
- data/test/lib/vedeu/views/default_attributes_test.rb +5 -5
- data/test/lib/vedeu/views/view_test.rb +5 -2
- data/test/test_helper.rb +1 -1
- data/vedeu.gemspec +1 -1
- metadata +7 -4
@@ -25,8 +25,8 @@ module Vedeu
|
|
25
25
|
|
26
26
|
new(name).render
|
27
27
|
end
|
28
|
-
|
29
|
-
|
28
|
+
alias clear_by_name render
|
29
|
+
alias by_name render
|
30
30
|
|
31
31
|
# Clear the content of the interface with the given name.
|
32
32
|
#
|
@@ -142,7 +142,7 @@ module Vedeu
|
|
142
142
|
# @return [String]
|
143
143
|
def optimised_output
|
144
144
|
Vedeu.timer("Optimised clearing #{clearing}: '#{name}'") do
|
145
|
-
height
|
145
|
+
Array.new(height) do |iy|
|
146
146
|
[
|
147
147
|
build_position(y + iy, x),
|
148
148
|
colour.to_s,
|
data/lib/vedeu/interfaces/dsl.rb
CHANGED
@@ -231,7 +231,7 @@ module Vedeu
|
|
231
231
|
def keymap(name = model.name, &block)
|
232
232
|
Vedeu.keymap(name, &block)
|
233
233
|
end
|
234
|
-
|
234
|
+
alias keys keymap
|
235
235
|
|
236
236
|
# Set the interface to visible.
|
237
237
|
#
|
@@ -246,7 +246,7 @@ module Vedeu
|
|
246
246
|
def show!
|
247
247
|
visible(true)
|
248
248
|
end
|
249
|
-
|
249
|
+
alias visible! show!
|
250
250
|
|
251
251
|
# Set the interface to invisible.
|
252
252
|
#
|
@@ -321,8 +321,8 @@ module Vedeu
|
|
321
321
|
def zindex(value)
|
322
322
|
model.zindex = value
|
323
323
|
end
|
324
|
-
|
325
|
-
|
324
|
+
alias z_index zindex
|
325
|
+
alias z zindex
|
326
326
|
|
327
327
|
end # DSL
|
328
328
|
|
@@ -20,7 +20,7 @@ module Vedeu
|
|
20
20
|
# @!attribute [rw] cursor_visible
|
21
21
|
# @return [Boolean]
|
22
22
|
attr_accessor :cursor_visible
|
23
|
-
|
23
|
+
alias cursor_visible? cursor_visible
|
24
24
|
|
25
25
|
# @!attribute [rw] delay
|
26
26
|
# @return [Fixnum|Float]
|
@@ -29,7 +29,7 @@ module Vedeu
|
|
29
29
|
# @!attribute [rw] editable
|
30
30
|
# @return [Boolean]
|
31
31
|
attr_accessor :editable
|
32
|
-
|
32
|
+
alias editable? editable
|
33
33
|
|
34
34
|
# @!attribute [rw] group
|
35
35
|
# @return [Symbol|String]
|
@@ -7,11 +7,11 @@ module Vedeu
|
|
7
7
|
# If the system supports Process::CLOCK_MONOTONIC use that for
|
8
8
|
# timestamps.
|
9
9
|
#
|
10
|
-
#
|
11
|
-
# # => 1447196800.3098037 (Time.now)
|
10
|
+
# @api public
|
12
11
|
#
|
13
12
|
module ClockTime
|
14
13
|
|
14
|
+
# {include:file:docs/dsl/by_method/clock_time.md}
|
15
15
|
# @return [Float|Time]
|
16
16
|
def self.clock_time
|
17
17
|
if defined?(Process::CLOCK_MONOTONIC)
|
@@ -28,7 +28,7 @@ module Vedeu
|
|
28
28
|
end # Logging
|
29
29
|
|
30
30
|
# @!method clock_time
|
31
|
-
#
|
31
|
+
# {include:file:docs/dsl/by_method/clock_time.md}
|
32
32
|
def_delegators Vedeu::Logging::ClockTime,
|
33
33
|
:clock_time
|
34
34
|
|
data/lib/vedeu/logging/debug.rb
CHANGED
@@ -59,12 +59,7 @@ module Vedeu
|
|
59
59
|
work = yield
|
60
60
|
|
61
61
|
result = ::RubyProf.stop
|
62
|
-
result.eliminate_methods!(
|
63
|
-
/^Array/,
|
64
|
-
/^Hash/,
|
65
|
-
/^String/,
|
66
|
-
/^Fixnum/,
|
67
|
-
])
|
62
|
+
result.eliminate_methods!(ignore_classes)
|
68
63
|
|
69
64
|
File.open(filename, 'w') do |file|
|
70
65
|
# - Creates a HTML visualization of the Ruby stack
|
@@ -102,6 +97,19 @@ module Vedeu
|
|
102
97
|
rescue NameError
|
103
98
|
yield
|
104
99
|
end
|
100
|
+
|
101
|
+
private
|
102
|
+
|
103
|
+
# @return [Array]
|
104
|
+
def ignore_classes
|
105
|
+
[
|
106
|
+
/^Array/,
|
107
|
+
/^Hash/,
|
108
|
+
/^String/,
|
109
|
+
/^Fixnum/,
|
110
|
+
]
|
111
|
+
end
|
112
|
+
|
105
113
|
# :nocov:
|
106
114
|
|
107
115
|
end # Debug
|
data/lib/vedeu/logging/log.rb
CHANGED
data/lib/vedeu/menus/dsl.rb
CHANGED
@@ -72,7 +72,7 @@ module Vedeu
|
|
72
72
|
def item(element)
|
73
73
|
model.collection << element
|
74
74
|
end
|
75
|
-
|
75
|
+
alias item= item
|
76
76
|
|
77
77
|
# Define the items for the menu. Most powerful when used with
|
78
78
|
# one of your model classes.
|
@@ -94,7 +94,7 @@ module Vedeu
|
|
94
94
|
def items(collection = [])
|
95
95
|
model.collection = collection
|
96
96
|
end
|
97
|
-
|
97
|
+
alias items= items
|
98
98
|
|
99
99
|
end # DSL
|
100
100
|
|
data/lib/vedeu/menus/menu.rb
CHANGED
@@ -95,19 +95,19 @@ module Vedeu
|
|
95
95
|
def items
|
96
96
|
items = []
|
97
97
|
@collection.each_with_index do |item, index|
|
98
|
-
if index == @current && index == @selected
|
99
|
-
|
98
|
+
items << if index == @current && index == @selected
|
99
|
+
[true, true, item]
|
100
100
|
|
101
|
-
|
102
|
-
|
101
|
+
elsif index == @current
|
102
|
+
[false, true, item]
|
103
103
|
|
104
|
-
|
105
|
-
|
104
|
+
elsif index == @selected
|
105
|
+
[true, false, item]
|
106
106
|
|
107
|
-
|
108
|
-
|
107
|
+
else
|
108
|
+
[false, false, item]
|
109
109
|
|
110
|
-
|
110
|
+
end
|
111
111
|
end
|
112
112
|
items
|
113
113
|
end
|
data/lib/vedeu/models/focus.rb
CHANGED
@@ -64,7 +64,7 @@ module Vedeu
|
|
64
64
|
|
65
65
|
update
|
66
66
|
end
|
67
|
-
|
67
|
+
alias focus_by_name by_name
|
68
68
|
|
69
69
|
# Return the interface currently focussed.
|
70
70
|
#
|
@@ -77,8 +77,8 @@ module Vedeu
|
|
77
77
|
|
78
78
|
storage[0]
|
79
79
|
end
|
80
|
-
|
81
|
-
|
80
|
+
alias focus current
|
81
|
+
alias name current
|
82
82
|
|
83
83
|
# Returns a boolean indicating whether the named interface is
|
84
84
|
# focussed.
|
@@ -91,7 +91,7 @@ module Vedeu
|
|
91
91
|
def current?(name)
|
92
92
|
current == name
|
93
93
|
end
|
94
|
-
|
94
|
+
alias focussed? current?
|
95
95
|
|
96
96
|
# Returns a boolean indicating whether there are interfaces
|
97
97
|
# registered.
|
@@ -114,7 +114,7 @@ module Vedeu
|
|
114
114
|
|
115
115
|
update
|
116
116
|
end
|
117
|
-
|
117
|
+
# alias next_item
|
118
118
|
|
119
119
|
# Put the next visible interface relative to the current
|
120
120
|
# interfaces in focus.
|
@@ -130,7 +130,7 @@ module Vedeu
|
|
130
130
|
|
131
131
|
update
|
132
132
|
end
|
133
|
-
|
133
|
+
alias focus_next next_visible_item
|
134
134
|
|
135
135
|
# Put the previous interface relative to the current interface
|
136
136
|
# in focus.
|
@@ -145,8 +145,8 @@ module Vedeu
|
|
145
145
|
|
146
146
|
update
|
147
147
|
end
|
148
|
-
|
149
|
-
|
148
|
+
alias prev prev_item
|
149
|
+
alias previous prev_item
|
150
150
|
|
151
151
|
# Put the previous visible interface relative to the current
|
152
152
|
# interfaces in focus.
|
@@ -162,7 +162,7 @@ module Vedeu
|
|
162
162
|
|
163
163
|
update
|
164
164
|
end
|
165
|
-
|
165
|
+
alias focus_previous prev_visible_item
|
166
166
|
|
167
167
|
# Refresh the interface in focus.
|
168
168
|
#
|
@@ -179,7 +179,7 @@ module Vedeu
|
|
179
179
|
def storage
|
180
180
|
@storage ||= in_memory
|
181
181
|
end
|
182
|
-
|
182
|
+
alias registered storage
|
183
183
|
|
184
184
|
# Returns a boolean indicating whether the named model is
|
185
185
|
# registered.
|
@@ -198,7 +198,7 @@ module Vedeu
|
|
198
198
|
def reset!
|
199
199
|
@storage = in_memory
|
200
200
|
end
|
201
|
-
|
201
|
+
alias reset reset!
|
202
202
|
|
203
203
|
private
|
204
204
|
|
data/lib/vedeu/models/page.rb
CHANGED
data/lib/vedeu/models/row.rb
CHANGED
@@ -74,7 +74,7 @@ module Vedeu
|
|
74
74
|
def eql?(other)
|
75
75
|
self.class == other.class && cells == other.cells
|
76
76
|
end
|
77
|
-
|
77
|
+
alias == eql?
|
78
78
|
|
79
79
|
# Provides the reset escape sequence at the end of a row to
|
80
80
|
# reset colour and style information to prevent colour bleed on
|
@@ -13,7 +13,7 @@ module Vedeu
|
|
13
13
|
# @!attribute [rw] visible
|
14
14
|
# @return [Boolean] Whether the toggleable is visible.
|
15
15
|
attr_accessor :visible
|
16
|
-
|
16
|
+
alias visible? visible
|
17
17
|
|
18
18
|
# Set the visible state to false and store the model.
|
19
19
|
#
|
@@ -60,8 +60,8 @@ module Vedeu
|
|
60
60
|
def hide(name = Vedeu.focus)
|
61
61
|
repository.by_name(name).hide
|
62
62
|
end
|
63
|
-
|
64
|
-
|
63
|
+
alias hide_group hide
|
64
|
+
alias hide_interface hide
|
65
65
|
|
66
66
|
# Shows the named model, or without a name, the model with same
|
67
67
|
# name as the currently focussed interface.
|
@@ -75,8 +75,8 @@ module Vedeu
|
|
75
75
|
def show(name = Vedeu.focus)
|
76
76
|
repository.by_name(name).show
|
77
77
|
end
|
78
|
-
|
79
|
-
|
78
|
+
alias show_group show
|
79
|
+
alias show_interface show
|
80
80
|
|
81
81
|
# Toggles the visibility of the named model, or without a name,
|
82
82
|
# the model with same name as the currently focussed interface.
|
@@ -90,8 +90,8 @@ module Vedeu
|
|
90
90
|
def toggle(name = Vedeu.focus)
|
91
91
|
repository.by_name(name).toggle
|
92
92
|
end
|
93
|
-
|
94
|
-
|
93
|
+
alias toggle_group toggle
|
94
|
+
alias toggle_interface toggle
|
95
95
|
|
96
96
|
# Hide the cursor if visible.
|
97
97
|
#
|
data/lib/vedeu/null/generic.rb
CHANGED
@@ -30,40 +30,40 @@ module Vedeu
|
|
30
30
|
def falsy
|
31
31
|
false
|
32
32
|
end
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
33
|
+
alias cursor_visible? falsy
|
34
|
+
alias enabled? falsy
|
35
|
+
alias maximise falsy
|
36
|
+
alias maximised? falsy
|
37
|
+
alias unmaximise falsy
|
38
|
+
alias visible falsy
|
39
|
+
alias visible? falsy
|
40
|
+
alias editable? falsy
|
41
41
|
|
42
42
|
# @return [NilClass]
|
43
43
|
def null(*)
|
44
44
|
nil
|
45
45
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
46
|
+
alias add null
|
47
|
+
alias bottom_item null
|
48
|
+
alias clear null
|
49
|
+
alias colour null
|
50
|
+
alias current_item null
|
51
|
+
alias deselect_item null
|
52
|
+
alias hide null
|
53
|
+
alias item null
|
54
|
+
alias items null
|
55
|
+
alias next_item null
|
56
|
+
alias parent null
|
57
|
+
alias prev_item null
|
58
|
+
alias render null
|
59
|
+
alias select_item null
|
60
|
+
alias selected_item null
|
61
|
+
alias show null
|
62
|
+
alias style null
|
63
|
+
alias toggle null
|
64
|
+
alias top_item null
|
65
|
+
alias view null
|
66
|
+
alias zindex null
|
67
67
|
|
68
68
|
# @return [Boolean]
|
69
69
|
def null?
|
@@ -14,6 +14,7 @@ module Vedeu
|
|
14
14
|
module CompressorCache
|
15
15
|
|
16
16
|
extend self
|
17
|
+
extend Vedeu::Repositories::Storage
|
17
18
|
|
18
19
|
# @param key [NilClass|Symbol]
|
19
20
|
# @return [Array<void>]
|
@@ -21,17 +22,6 @@ module Vedeu
|
|
21
22
|
storage.fetch(key, [])
|
22
23
|
end
|
23
24
|
|
24
|
-
# @return [Hash<Symbol => Array<void>>]
|
25
|
-
def reset!
|
26
|
-
@storage = in_memory
|
27
|
-
end
|
28
|
-
alias_method :reset, :reset!
|
29
|
-
|
30
|
-
# @return [Hash<Symbol => Array<void>>]
|
31
|
-
def storage
|
32
|
-
@storage ||= in_memory
|
33
|
-
end
|
34
|
-
|
35
25
|
# @param key [NilClass|Symbol]
|
36
26
|
# @param value [Array|NilClass]
|
37
27
|
# @return [Hash<Symbol => Array<void>>]
|
@@ -24,7 +24,9 @@ module Vedeu
|
|
24
24
|
|
25
25
|
def_delegators :geometry,
|
26
26
|
:bordered_height,
|
27
|
-
:bordered_width
|
27
|
+
:bordered_width,
|
28
|
+
:bx,
|
29
|
+
:by
|
28
30
|
|
29
31
|
def_delegators :cursor,
|
30
32
|
:ox,
|
@@ -57,7 +59,7 @@ module Vedeu
|
|
57
59
|
def to_s
|
58
60
|
Array(render).map(&:to_s).join("\n")
|
59
61
|
end
|
60
|
-
|
62
|
+
alias to_str to_s
|
61
63
|
|
62
64
|
protected
|
63
65
|
|
@@ -67,16 +69,6 @@ module Vedeu
|
|
67
69
|
|
68
70
|
private
|
69
71
|
|
70
|
-
# @return [Fixnum]
|
71
|
-
def bx
|
72
|
-
@bx ||= geometry.bx
|
73
|
-
end
|
74
|
-
|
75
|
-
# @return [Fixnum]
|
76
|
-
def by
|
77
|
-
@by ||= geometry.by
|
78
|
-
end
|
79
|
-
|
80
72
|
# Using the current cursor's x position, return a range of
|
81
73
|
# visible columns.
|
82
74
|
#
|