vedeu 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -2
  3. data/.travis.yml +1 -1
  4. data/README.md +2 -6
  5. data/config/rubocop_enabled.yml +0 -6
  6. data/docs/dsl/by_method/clock_time.md +4 -1
  7. data/lib/vedeu/application/application_controller.rb +2 -2
  8. data/lib/vedeu/application/controller.rb +3 -3
  9. data/lib/vedeu/borders/border.rb +6 -6
  10. data/lib/vedeu/borders/dsl.rb +26 -26
  11. data/lib/vedeu/borders/refresh.rb +2 -2
  12. data/lib/vedeu/borders/title.rb +4 -4
  13. data/lib/vedeu/buffers/refresh.rb +8 -7
  14. data/lib/vedeu/buffers/terminal.rb +1 -1
  15. data/lib/vedeu/buffers/view.rb +2 -2
  16. data/lib/vedeu/cells/clear.rb +1 -1
  17. data/lib/vedeu/cells/cursor.rb +6 -6
  18. data/lib/vedeu/cells/empty.rb +2 -2
  19. data/lib/vedeu/cells/escape.rb +6 -6
  20. data/lib/vedeu/coercers/alignment.rb +1 -1
  21. data/lib/vedeu/coercers/colour_attributes.rb +8 -16
  22. data/lib/vedeu/colours/background.rb +4 -8
  23. data/lib/vedeu/colours/colour.rb +4 -4
  24. data/lib/vedeu/colours/foreground.rb +4 -8
  25. data/lib/vedeu/colours/repository.rb +1 -1
  26. data/lib/vedeu/colours/translator.rb +6 -6
  27. data/lib/vedeu/common.rb +1 -1
  28. data/lib/vedeu/configuration/api.rb +15 -15
  29. data/lib/vedeu/configuration/configuration.rb +8 -8
  30. data/lib/vedeu/cursors/coordinate.rb +4 -4
  31. data/lib/vedeu/cursors/cursor.rb +2 -2
  32. data/lib/vedeu/distributed/client.rb +2 -2
  33. data/lib/vedeu/distributed/server.rb +8 -10
  34. data/lib/vedeu/distributed/subprocess.rb +1 -1
  35. data/lib/vedeu/distributed/uri.rb +1 -1
  36. data/lib/vedeu/dsl/cursors.rb +2 -2
  37. data/lib/vedeu/dsl/elements.rb +5 -5
  38. data/lib/vedeu/dsl/helpers/align.rb +1 -1
  39. data/lib/vedeu/dsl/helpers/attributes.rb +1 -1
  40. data/lib/vedeu/dsl/presentation.rb +15 -15
  41. data/lib/vedeu/dsl/view.rb +1 -1
  42. data/lib/vedeu/dsl/views.rb +1 -1
  43. data/lib/vedeu/editor/cursor.rb +1 -1
  44. data/lib/vedeu/editor/line.rb +2 -2
  45. data/lib/vedeu/editor/lines.rb +2 -2
  46. data/lib/vedeu/esc/borders.rb +19 -19
  47. data/lib/vedeu/esc/colours.rb +1 -1
  48. data/lib/vedeu/events/aliases.rb +3 -15
  49. data/lib/vedeu/events/event.rb +14 -14
  50. data/lib/vedeu/events/repository.rb +1 -1
  51. data/lib/vedeu/geometries/area/area.rb +5 -5
  52. data/lib/vedeu/geometries/area/dimension.rb +1 -1
  53. data/lib/vedeu/geometries/dsl/dsl.rb +7 -7
  54. data/lib/vedeu/geometries/geometry.rb +2 -2
  55. data/lib/vedeu/geometries/position.rb +6 -6
  56. data/lib/vedeu/groups/clear.rb +2 -2
  57. data/lib/vedeu/groups/group.rb +2 -2
  58. data/lib/vedeu/input/dsl.rb +1 -1
  59. data/lib/vedeu/input/key.rb +3 -3
  60. data/lib/vedeu/input/mapper.rb +2 -2
  61. data/lib/vedeu/input/read.rb +2 -4
  62. data/lib/vedeu/input/store.rb +1 -17
  63. data/lib/vedeu/input/translator.rb +49 -45
  64. data/lib/vedeu/interfaces/clear.rb +3 -3
  65. data/lib/vedeu/interfaces/dsl.rb +4 -4
  66. data/lib/vedeu/interfaces/interface.rb +2 -2
  67. data/lib/vedeu/logging/clock_time.rb +3 -3
  68. data/lib/vedeu/logging/debug.rb +14 -6
  69. data/lib/vedeu/logging/log.rb +1 -1
  70. data/lib/vedeu/menus/dsl.rb +2 -2
  71. data/lib/vedeu/menus/menu.rb +9 -9
  72. data/lib/vedeu/models/focus.rb +11 -11
  73. data/lib/vedeu/models/page.rb +1 -1
  74. data/lib/vedeu/models/row.rb +1 -1
  75. data/lib/vedeu/models/toggleable.rb +7 -7
  76. data/lib/vedeu/null/generic.rb +29 -29
  77. data/lib/vedeu/output/compressor_cache.rb +1 -11
  78. data/lib/vedeu/output/viewport.rb +4 -12
  79. data/lib/vedeu/output/write.rb +3 -3
  80. data/lib/vedeu/plugins/plugin.rb +1 -1
  81. data/lib/vedeu/presentation/colour.rb +1 -1
  82. data/lib/vedeu/presentation/presentation.rb +1 -1
  83. data/lib/vedeu/presentation/style.rb +4 -4
  84. data/lib/vedeu/renderers/all.rb +1 -14
  85. data/lib/vedeu/renderers/options.rb +1 -1
  86. data/lib/vedeu/repositories/all.rb +1 -0
  87. data/lib/vedeu/repositories/assemblage.rb +1 -1
  88. data/lib/vedeu/repositories/collection.rb +4 -4
  89. data/lib/vedeu/repositories/registerable.rb +2 -2
  90. data/lib/vedeu/repositories/repositories.rb +1 -1
  91. data/lib/vedeu/repositories/repository.rb +3 -3
  92. data/lib/vedeu/repositories/storage.rb +38 -0
  93. data/lib/vedeu/repositories/store.rb +5 -22
  94. data/lib/vedeu/runtime/application.rb +1 -1
  95. data/lib/vedeu/runtime/flags.rb +3 -3
  96. data/lib/vedeu/runtime/router.rb +3 -18
  97. data/lib/vedeu/templating/helpers.rb +5 -3
  98. data/lib/vedeu/templating/view_template.rb +26 -18
  99. data/lib/vedeu/terminal/terminal.rb +5 -5
  100. data/lib/vedeu/version.rb +1 -1
  101. data/lib/vedeu/views/chars.rb +1 -1
  102. data/lib/vedeu/views/composition.rb +4 -4
  103. data/lib/vedeu/views/default_attributes.rb +2 -2
  104. data/lib/vedeu/views/line.rb +6 -6
  105. data/lib/vedeu/views/lines.rb +1 -1
  106. data/lib/vedeu/views/stream.rb +6 -6
  107. data/lib/vedeu/views/streams.rb +1 -1
  108. data/lib/vedeu/views/view.rb +4 -4
  109. data/test/lib/vedeu/borders/border_test.rb +1 -1
  110. data/test/lib/vedeu/borders/caption_test.rb +1 -1
  111. data/test/lib/vedeu/borders/dsl_test.rb +2 -3
  112. data/test/lib/vedeu/borders/refresh_test.rb +1 -1
  113. data/test/lib/vedeu/borders/title_test.rb +1 -1
  114. data/test/lib/vedeu/buffers/buffer_test.rb +7 -7
  115. data/test/lib/vedeu/buffers/refresh_test.rb +1 -1
  116. data/test/lib/vedeu/colours/background_test.rb +27 -0
  117. data/test/lib/vedeu/colours/foreground_test.rb +27 -0
  118. data/test/lib/vedeu/cursors/cursor_test.rb +3 -3
  119. data/test/lib/vedeu/cursors/move_test.rb +1 -1
  120. data/test/lib/vedeu/cursors/refresh_test.rb +1 -1
  121. data/test/lib/vedeu/cursors/reposition_test.rb +2 -2
  122. data/test/lib/vedeu/dsl/view_test.rb +6 -8
  123. data/test/lib/vedeu/editor/cropper_test.rb +1 -1
  124. data/test/lib/vedeu/editor/cursor_test.rb +1 -1
  125. data/test/lib/vedeu/editor/document_test.rb +1 -1
  126. data/test/lib/vedeu/editor/editor_test.rb +1 -1
  127. data/test/lib/vedeu/events/aliases_test.rb +0 -14
  128. data/test/lib/vedeu/geometries/area/area_test.rb +1 -1
  129. data/test/lib/vedeu/geometries/geometry_test.rb +1 -1
  130. data/test/lib/vedeu/geometries/move_test.rb +1 -1
  131. data/test/lib/vedeu/groups/clear_test.rb +1 -1
  132. data/test/lib/vedeu/groups/dsl_test.rb +1 -1
  133. data/test/lib/vedeu/groups/group_test.rb +1 -1
  134. data/test/lib/vedeu/groups/refresh_test.rb +1 -1
  135. data/test/lib/vedeu/input/capture_test.rb +2 -2
  136. data/test/lib/vedeu/input/store_test.rb +0 -34
  137. data/test/lib/vedeu/interfaces/clear_test.rb +1 -1
  138. data/test/lib/vedeu/interfaces/dsl_test.rb +4 -4
  139. data/test/lib/vedeu/interfaces/interface_test.rb +1 -1
  140. data/test/lib/vedeu/menus/dsl_test.rb +1 -1
  141. data/test/lib/vedeu/null/generic_test.rb +1 -1
  142. data/test/lib/vedeu/output/compressor_cache_test.rb +0 -33
  143. data/test/lib/vedeu/renderers/all_test.rb +0 -8
  144. data/test/lib/vedeu/repositories/repository_test.rb +2 -2
  145. data/test/lib/vedeu/repositories/storage_test.rb +74 -0
  146. data/test/lib/vedeu/repositories/store_test.rb +10 -28
  147. data/test/lib/vedeu/runtime/router_test.rb +0 -8
  148. data/test/lib/vedeu/views/default_attributes_test.rb +5 -5
  149. data/test/lib/vedeu/views/view_test.rb +5 -2
  150. data/test/test_helper.rb +1 -1
  151. data/vedeu.gemspec +1 -1
  152. metadata +7 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9555539ac0be2991f1d6a1c9ea27c3579654085
4
- data.tar.gz: a6c9a5aa1f8ab952bd5eda7026f4c9793f82f02b
3
+ metadata.gz: e661f87496fae0bee6cfad0f28107ef83de0afd7
4
+ data.tar.gz: e9c940bfeba84b518e8c9aae271b78e64ece3e7b
5
5
  SHA512:
6
- metadata.gz: b14e6a7c9930b1fda6fc16b6a3c5a642cba1910352cdd0ad2962231230c8b50c19210f31790421c1398ee69c18be7475331f3089db6cd157f7e85fc50bfebf02
7
- data.tar.gz: c7eb1dfa89fb435196236c0a9623aa2fb3155d73b5c98a9bc0492d8677e6f2ed940b5e4642b350c167dd5fdbcb62c40b49134c70bcc3b7e77c565be06d09acd2
6
+ metadata.gz: 2f690ac0877398edcf8cae81bf4d82d0da2bc997e938fec1680cd527d544b036363295bc9cfaf0a79c8cbef1fef4d7bde28b7f7580a46da72d02cab7a4407c42
7
+ data.tar.gz: f383c6aa69b348950df538a5cf5df7b942adc99d3ce927d62cd88c54d51450511c337b0d642b32e66217ceee5528cb2159caab913ef42e09b7a2a256e22b3a1f
data/.rubocop.yml CHANGED
@@ -24,10 +24,10 @@ AllCops:
24
24
  - 'integrations/**/*'
25
25
  - 'test/**/*'
26
26
  - 'vendor/**/*'
27
- RunRailsCops: false
28
27
  DisplayCopNames: true
29
28
  DisplayStyleGuide: true
30
29
  StyleGuideCopsOnly: false
30
+ TargetRubyVersion: 2.3
31
31
 
32
32
  Lint/UnusedMethodArgument:
33
33
  Enabled: false
@@ -93,7 +93,7 @@ Style/SpaceAroundOperators:
93
93
  Style/TrailingBlankLines:
94
94
  EnforcedStyle: final_newline
95
95
 
96
- Style/TrailingComma:
96
+ Style/TrailingCommaInLiteral:
97
97
  EnforcedStyleForMultiline: comma
98
98
 
99
99
  Metrics/AbcSize:
data/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.3
3
+ - 2.3.0
4
4
  cache: bundler
5
5
  script: 'bundle exec rake'
6
6
  sudo: false
data/README.md CHANGED
@@ -9,12 +9,8 @@ Vedeu (vee-dee-you; aka VDU) is my attempt at creating a terminal based
9
9
 
10
10
  ## Requirements
11
11
 
12
- Vedeu was been built primarily with Ruby v2.1; however, the
13
- [.ruby-version](https://github.com/gavinlaking/vedeu/blob/master/.ruby-version)
14
- file will indicate the currently used Ruby version.
15
-
16
- When Vedeu started I was a MacOSX user, I've since moved to Linux. You shouldn't
17
- have any problems with either of these operating systems.
12
+ - Ruby (see [.ruby-version](https://github.com/gavinlaking/vedeu/blob/master/.ruby-version) for current version)
13
+ - Linux/MacOSX
18
14
 
19
15
  **Note**: You may have trouble running Vedeu with Windows installations. (Pull
20
16
  requests welcome!)
@@ -14,9 +14,3 @@ Style/AsciiComments:
14
14
  Style/Documentation:
15
15
  Description: 'Document classes and non-namespace modules.'
16
16
  Enabled: false
17
-
18
- Style/SingleSpaceBeforeFirstArg:
19
- Description: >-
20
- Checks that exactly one space is used between a method name
21
- and the first argument for method calls without parentheses.
22
- Enabled: false
@@ -1 +1,4 @@
1
- @todo Add more documentation.
1
+ ### Vedeu.clock_time
2
+
3
+ Vedeu.clock_time # => 15217.232113 (Process::CLOCK_MONOTONIC)
4
+ # => 1447196800.3098037 (Time.now)
@@ -29,8 +29,8 @@ module Vedeu
29
29
  def redirect_to(controller, action, **params)
30
30
  Vedeu.trigger(:_goto_, controller, action, params)
31
31
  end
32
- alias_method :redirect, :redirect_to
33
- alias_method :goto, :redirect_to
32
+ alias redirect redirect_to
33
+ alias goto redirect_to
34
34
 
35
35
  protected
36
36
 
@@ -36,7 +36,7 @@ module Vedeu
36
36
  Vedeu::Runtime::Router.add_controller(controller_name,
37
37
  ancestors[0].to_s)
38
38
  end
39
- alias_method :controller_name, :controller
39
+ alias controller_name controller
40
40
 
41
41
  # Specifying the action names in your controller provides Vedeu
42
42
  # with the means to route requests to different parts of your
@@ -70,8 +70,8 @@ module Vedeu
70
70
  Vedeu::Runtime::Router.add_action(@controller_name, action_name)
71
71
  end
72
72
  end
73
- alias_method :action_name, :action
74
- alias_method :actions, :action
73
+ alias action_name action
74
+ alias actions action
75
75
 
76
76
  end # ClassMethods
77
77
 
@@ -51,25 +51,25 @@ module Vedeu
51
51
  # @return [Boolean] Determines whether the bottom border should
52
52
  # be shown.
53
53
  attr_accessor :show_bottom
54
- alias_method :bottom?, :show_bottom
54
+ alias bottom? show_bottom
55
55
 
56
56
  # @!attribute [rw] show_left
57
57
  # @return [Boolean] Determines whether the left border should
58
58
  # be shown.
59
59
  attr_accessor :show_left
60
- alias_method :left?, :show_left
60
+ alias left? show_left
61
61
 
62
62
  # @!attribute [rw] show_right
63
63
  # @return [Boolean] Determines whether the right border should
64
64
  # be shown.
65
65
  attr_accessor :show_right
66
- alias_method :right?, :show_right
66
+ alias right? show_right
67
67
 
68
68
  # @!attribute [rw] show_top
69
69
  # @return [Boolean] Determines whether the top border should
70
70
  # be shown.
71
71
  attr_accessor :show_top
72
- alias_method :top?, :show_top
72
+ alias top? show_top
73
73
 
74
74
  # @!attribute [r] title
75
75
  # @return [String] An optional title for when the top border is
@@ -120,7 +120,7 @@ module Vedeu
120
120
  # @return [Boolean] Determines whether this border should be
121
121
  # rendered.
122
122
  attr_accessor :enabled
123
- alias_method :enabled?, :enabled
123
+ alias enabled? enabled
124
124
 
125
125
  # Returns a new instance of Vedeu::Borders::Border.
126
126
  #
@@ -266,7 +266,7 @@ module Vedeu
266
266
  # @return [Vedeu::Cells::BottomHorizontal]
267
267
  def bottom_horizontal
268
268
  @bottom_horizontal ||= Vedeu::Cells::BottomHorizontal
269
- .new(cell_attributes)
269
+ .new(cell_attributes)
270
270
  end
271
271
 
272
272
  # Return the client application configured bottom left cell
@@ -38,7 +38,7 @@ module Vedeu
38
38
  def bottom_left(char, options = {})
39
39
  model.bottom_left = Vedeu::Cells::BottomLeft.new(attrs(char, options))
40
40
  end
41
- alias_method :bottom_left=, :bottom_left
41
+ alias bottom_left= bottom_left
42
42
 
43
43
  # {include:file:docs/dsl/by_method/bottom_right.md}
44
44
  # @param char [String] Character to be used as the bottom right
@@ -51,7 +51,7 @@ module Vedeu
51
51
  def bottom_right(char, options = {})
52
52
  model.bottom_right = Vedeu::Cells::BottomRight.new(attrs(char, options))
53
53
  end
54
- alias_method :bottom_right=, :bottom_right
54
+ alias bottom_right= bottom_right
55
55
 
56
56
  # {include:file:docs/dsl/by_method/disable.md}
57
57
  # @return [Boolean]
@@ -65,7 +65,7 @@ module Vedeu
65
65
 
66
66
  model.enabled
67
67
  end
68
- alias_method :disabled!, :disable!
68
+ alias disabled! disable!
69
69
 
70
70
  # {include:file:docs/dsl/by_method/enable.md}
71
71
  # @return [Boolean]
@@ -79,7 +79,7 @@ module Vedeu
79
79
 
80
80
  model.enabled
81
81
  end
82
- alias_method :enabled!, :enable!
82
+ alias enabled! enable!
83
83
 
84
84
  # {include:file:docs/dsl/by_method/top_horizontal.md}
85
85
  # @param char [String] Character to be used as the top
@@ -91,9 +91,9 @@ module Vedeu
91
91
  # @return [String]
92
92
  def top_horizontal(char, options = {})
93
93
  model.top_horizontal = Vedeu::Cells::TopHorizontal
94
- .new(attrs(char, options))
94
+ .new(attrs(char, options))
95
95
  end
96
- alias_method :top_horizontal=, :top_horizontal
96
+ alias top_horizontal= top_horizontal
97
97
 
98
98
  # {include:file:docs/dsl/by_method/bottom_horizontal.md}
99
99
  # @param char [String] Character to be used as the bottom
@@ -105,9 +105,9 @@ module Vedeu
105
105
  # @return [String]
106
106
  def bottom_horizontal(char, options = {})
107
107
  model.bottom_horizontal = Vedeu::Cells::BottomHorizontal
108
- .new(attrs(char, options))
108
+ .new(attrs(char, options))
109
109
  end
110
- alias_method :bottom_horizontal=, :bottom_horizontal
110
+ alias bottom_horizontal= bottom_horizontal
111
111
 
112
112
  # {include:file:docs/dsl/by_method/horizontal.md}
113
113
  # @param char [String] Character to be used as the horizontal
@@ -120,7 +120,7 @@ module Vedeu
120
120
  def horizontal(char, options = {})
121
121
  model.horizontal = Vedeu::Cells::Horizontal.new(attrs(char, options))
122
122
  end
123
- alias_method :horizontal=, :horizontal
123
+ alias horizontal= horizontal
124
124
 
125
125
  # {include:file:docs/dsl/by_method/bottom.md}
126
126
  # @param value [Boolean] All values evaluate as true except nil
@@ -131,8 +131,8 @@ module Vedeu
131
131
 
132
132
  model.show_bottom = boolean
133
133
  end
134
- alias_method :show_bottom, :bottom
135
- alias_method :bottom=, :bottom
134
+ alias show_bottom bottom
135
+ alias bottom= bottom
136
136
 
137
137
  # Disable the bottom border.
138
138
  #
@@ -157,8 +157,8 @@ module Vedeu
157
157
 
158
158
  model.show_left = boolean
159
159
  end
160
- alias_method :show_left, :left
161
- alias_method :left=, :left
160
+ alias show_left left
161
+ alias left= left
162
162
 
163
163
  # Disable the left border.
164
164
  #
@@ -183,8 +183,8 @@ module Vedeu
183
183
 
184
184
  model.show_right = boolean
185
185
  end
186
- alias_method :show_right, :right
187
- alias_method :right=, :right
186
+ alias show_right right
187
+ alias right= right
188
188
 
189
189
  # Disable the right border.
190
190
  #
@@ -207,7 +207,7 @@ module Vedeu
207
207
  model.title = value
208
208
  model.title
209
209
  end
210
- alias_method :title=, :title
210
+ alias title= title
211
211
 
212
212
  # {include:file:docs/dsl/by_method/caption.md}
213
213
  # @param value [String] The caption.
@@ -216,7 +216,7 @@ module Vedeu
216
216
  model.caption = value
217
217
  model.caption
218
218
  end
219
- alias_method :caption=, :caption
219
+ alias caption= caption
220
220
 
221
221
  # {include:file:docs/dsl/by_method/top.md}
222
222
  # @param value [Boolean] All values evaluate as true except nil
@@ -227,8 +227,8 @@ module Vedeu
227
227
 
228
228
  model.show_top = boolean
229
229
  end
230
- alias_method :show_top, :top
231
- alias_method :top=, :top
230
+ alias show_top top
231
+ alias top= top
232
232
 
233
233
  # Disable the top border.
234
234
  #
@@ -255,7 +255,7 @@ module Vedeu
255
255
  def top_left(char, options = {})
256
256
  model.top_left = Vedeu::Cells::TopLeft.new(attrs(char, options))
257
257
  end
258
- alias_method :top_left=, :top_left
258
+ alias top_left= top_left
259
259
 
260
260
  # {include:file:docs/dsl/by_method/top_right.md}
261
261
  # @param char [String] Character to be used as the top right
@@ -268,7 +268,7 @@ module Vedeu
268
268
  def top_right(char, options = {})
269
269
  model.top_right = Vedeu::Cells::TopRight.new(attrs(char, options))
270
270
  end
271
- alias_method :top_right=, :top_right
271
+ alias top_right= top_right
272
272
 
273
273
  # {include:file:docs/dsl/by_method/left_vertical.md}
274
274
  # @param char [String] Character to be used as the left vertical
@@ -280,9 +280,9 @@ module Vedeu
280
280
  # @return [String]
281
281
  def left_vertical(char, options = {})
282
282
  model.left_vertical = Vedeu::Cells::LeftVertical
283
- .new(attrs(char, options))
283
+ .new(attrs(char, options))
284
284
  end
285
- alias_method :left_vertical=, :left_vertical
285
+ alias left_vertical= left_vertical
286
286
 
287
287
  # {include:file:docs/dsl/by_method/right_vertical.md}
288
288
  # @param char [String] Character to be used as the right
@@ -294,9 +294,9 @@ module Vedeu
294
294
  # @return [String]
295
295
  def right_vertical(char, options = {})
296
296
  model.right_vertical = Vedeu::Cells::RightVertical
297
- .new(attrs(char, options))
297
+ .new(attrs(char, options))
298
298
  end
299
- alias_method :right_vertical=, :right_vertical
299
+ alias right_vertical= right_vertical
300
300
 
301
301
  # {include:file:docs/dsl/by_method/vertical.md}
302
302
  # @param char [String] Character to be used as the vertical
@@ -309,7 +309,7 @@ module Vedeu
309
309
  def vertical(char, options = {})
310
310
  model.vertical = Vedeu::Cells::Vertical.new(attrs(char, options))
311
311
  end
312
- alias_method :vertical=, :vertical
312
+ alias vertical= vertical
313
313
 
314
314
  private
315
315
 
@@ -73,7 +73,7 @@ module Vedeu
73
73
  def by_name
74
74
  Vedeu.render_output(output) if enabled? && visible?
75
75
  end
76
- alias_method :render, :by_name
76
+ alias render by_name
77
77
 
78
78
  protected
79
79
 
@@ -139,7 +139,7 @@ module Vedeu
139
139
  def interface
140
140
  @interface ||= Vedeu.interfaces.by_name(name)
141
141
  end
142
- alias_method :parent, :interface
142
+ alias parent interface
143
143
 
144
144
  # Renders the left border for the interface.
145
145
  #
@@ -42,7 +42,7 @@ module Vedeu
42
42
  def eql?(other)
43
43
  self.class == other.class && value == other.value
44
44
  end
45
- alias_method :==, :eql?
45
+ alias == eql?
46
46
 
47
47
  # Overwrite the border from
48
48
  # {Vedeu::Borders::Border#build_horizontal} on the top border to
@@ -63,7 +63,7 @@ module Vedeu
63
63
  def to_s
64
64
  value.to_s
65
65
  end
66
- alias_method :to_str, :to_s
66
+ alias to_str to_s
67
67
 
68
68
  # Return the value (a title or a caption) or an empty string.
69
69
  #
@@ -71,8 +71,8 @@ module Vedeu
71
71
  def value
72
72
  @value || ''
73
73
  end
74
- alias_method :title, :value
75
- alias_method :caption, :value
74
+ alias title value
75
+ alias caption value
76
76
 
77
77
  protected
78
78
 
@@ -36,7 +36,7 @@ module Vedeu
36
36
  # @option options content_only [Boolean]
37
37
  # @return [Vedeu::Buffers::Refresh]
38
38
  def initialize(name, options = {})
39
- @name = present?(name) ? name : Vedeu.focus
39
+ @name = name
40
40
  @options = options
41
41
  end
42
42
 
@@ -49,11 +49,7 @@ module Vedeu
49
49
  Vedeu.trigger(:_refresh_border_, name) unless content_only?
50
50
  end
51
51
 
52
- protected
53
-
54
- # @!attribute [r] name
55
- # @return [String|Symbol]
56
- attr_reader :name
52
+ private
57
53
 
58
54
  # @return [Vedeu::Buffers::Buffer]
59
55
  def buffer
@@ -65,6 +61,11 @@ module Vedeu
65
61
  truthy?(options[:content_only])
66
62
  end
67
63
 
64
+ # @return [String|Symbol]
65
+ def name
66
+ present?(@name) ? @name : Vedeu.focus
67
+ end
68
+
68
69
  # @return [Hash<Symbol => Boolean>]
69
70
  def options
70
71
  defaults.merge!(@options)
@@ -73,7 +74,7 @@ module Vedeu
73
74
  # @return [Hash<Symbol => Boolean>]
74
75
  def defaults
75
76
  {
76
- content_only: false
77
+ content_only: false,
77
78
  }
78
79
  end
79
80
 
@@ -84,7 +84,7 @@ module Vedeu
84
84
  def buffer
85
85
  @buffer ||= Vedeu::Buffers::View.new(name: name)
86
86
  end
87
- alias_method :cells, :buffer
87
+ alias cells buffer
88
88
 
89
89
  end # Terminal
90
90
 
@@ -25,7 +25,7 @@ module Vedeu
25
25
  # @return [Hash<Symbol => String|Symbol>]
26
26
  def attributes
27
27
  {
28
- name: name
28
+ name: name,
29
29
  }
30
30
  end
31
31
 
@@ -73,7 +73,7 @@ module Vedeu
73
73
  # @return [Hash<Symbol => NilClass|String|Symbol]
74
74
  def defaults
75
75
  {
76
- name: nil
76
+ name: nil,
77
77
  }
78
78
  end
79
79