vedeu 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.yardopts +0 -1
- data/README.md +1 -4
- data/docs/api.md +0 -8
- data/docs/borders.md +4 -0
- data/docs/dsl/borders.md +37 -0
- data/docs/dsl/by_method/add_command.md +0 -0
- data/docs/dsl/by_method/add_keypress.md +0 -0
- data/docs/dsl/by_method/all_commands.md +0 -0
- data/docs/dsl/by_method/all_keypresses.md +0 -0
- data/docs/dsl/by_method/background_colours.md +3 -0
- data/docs/dsl/by_method/bind.md +0 -0
- data/docs/dsl/by_method/bind_alias.md +0 -0
- data/docs/dsl/by_method/border.md +7 -0
- data/docs/dsl/by_method/borders.md +0 -0
- data/docs/dsl/by_method/bottom.md +10 -0
- data/docs/dsl/by_method/bottom_horizontal.md +8 -0
- data/docs/dsl/by_method/bottom_left.md +8 -0
- data/docs/dsl/by_method/bottom_right.md +8 -0
- data/docs/dsl/by_method/bound.md +0 -0
- data/docs/dsl/by_method/buffer_update.md +0 -0
- data/docs/dsl/by_method/buffer_write.md +0 -0
- data/docs/dsl/by_method/buffers.md +0 -0
- data/docs/dsl/by_method/caption.md +11 -0
- data/docs/dsl/by_method/clear.md +7 -0
- data/docs/dsl/by_method/clear_by_group.md +0 -0
- data/docs/dsl/by_method/clear_by_name.md +0 -0
- data/docs/dsl/by_method/clear_content_by_name.md +0 -0
- data/docs/dsl/by_method/clock_time.md +0 -0
- data/docs/dsl/by_method/configuration.md +5 -0
- data/docs/dsl/by_method/configure.md +6 -0
- data/docs/dsl/by_method/cursor.md +0 -0
- data/docs/dsl/by_method/cursors.md +0 -0
- data/docs/dsl/by_method/debug.md +4 -0
- data/docs/dsl/by_method/direct_write.md +0 -0
- data/docs/dsl/by_method/disable.md +14 -0
- data/docs/dsl/by_method/documents.md +0 -0
- data/docs/dsl/by_method/drb_restart.md +0 -0
- data/docs/dsl/by_method/drb_start.md +0 -0
- data/docs/dsl/by_method/drb_status.md +0 -0
- data/docs/dsl/by_method/drb_stop.md +0 -0
- data/docs/dsl/by_method/enable.md +14 -0
- data/docs/dsl/by_method/events.md +0 -0
- data/docs/dsl/by_method/exit.md +0 -0
- data/docs/dsl/by_method/focus.md +0 -0
- data/docs/dsl/by_method/focus_by_name.md +0 -0
- data/docs/dsl/by_method/focus_next.md +0 -0
- data/docs/dsl/by_method/focus_previous.md +0 -0
- data/docs/dsl/by_method/focussed.md +0 -0
- data/docs/dsl/by_method/foreground_colours.md +3 -0
- data/docs/dsl/by_method/geometries.md +0 -0
- data/docs/dsl/by_method/geometry.md +0 -0
- data/docs/dsl/by_method/goto.md +6 -0
- data/docs/dsl/by_method/group.md +0 -0
- data/docs/dsl/by_method/groups.md +0 -0
- data/docs/dsl/by_method/height.md +7 -0
- data/docs/dsl/by_method/hide_cursor.md +0 -0
- data/docs/dsl/by_method/hide_group.md +0 -0
- data/docs/dsl/by_method/hide_interface.md +0 -0
- data/docs/dsl/by_method/horizontal.md +6 -0
- data/docs/dsl/by_method/interface.md +0 -0
- data/docs/dsl/by_method/interfaces.md +0 -0
- data/docs/dsl/by_method/keymap.md +0 -0
- data/docs/dsl/by_method/keymaps.md +0 -0
- data/docs/dsl/by_method/keypress.md +0 -0
- data/docs/dsl/by_method/last_command.md +0 -0
- data/docs/dsl/by_method/last_keypress.md +0 -0
- data/docs/dsl/by_method/left.md +10 -0
- data/docs/dsl/by_method/left_vertical.md +8 -0
- data/docs/dsl/by_method/log.md +0 -0
- data/docs/dsl/by_method/log_stderr.md +0 -0
- data/docs/dsl/by_method/log_stdout.md +0 -0
- data/docs/dsl/by_method/log_timestamp.md +0 -0
- data/docs/dsl/by_method/menu.md +0 -0
- data/docs/dsl/by_method/menus.md +0 -0
- data/docs/dsl/by_method/profile.md +6 -0
- data/docs/dsl/by_method/read.md +0 -0
- data/docs/dsl/by_method/ready.md +0 -0
- data/docs/dsl/by_method/refresh.md +3 -0
- data/docs/dsl/by_method/render.md +0 -0
- data/docs/dsl/by_method/render_output.md +0 -0
- data/docs/dsl/by_method/renderer.md +0 -0
- data/docs/dsl/by_method/renderers.md +0 -0
- data/docs/dsl/by_method/renders.md +0 -0
- data/docs/dsl/by_method/resize.md +5 -0
- data/docs/dsl/by_method/right.md +10 -0
- data/docs/dsl/by_method/right_vertical.md +8 -0
- data/docs/dsl/by_method/show_cursor.md +0 -0
- data/docs/dsl/by_method/show_group.md +0 -0
- data/docs/dsl/by_method/show_interface.md +0 -0
- data/docs/dsl/by_method/timer.md +12 -0
- data/docs/dsl/by_method/title.md +12 -0
- data/docs/dsl/by_method/toggle_cursor.md +0 -0
- data/docs/dsl/by_method/toggle_group.md +0 -0
- data/docs/dsl/by_method/toggle_interface.md +0 -0
- data/docs/dsl/by_method/top.md +10 -0
- data/docs/dsl/by_method/top_horizontal.md +8 -0
- data/docs/dsl/by_method/top_left.md +8 -0
- data/docs/dsl/by_method/top_right.md +8 -0
- data/docs/dsl/by_method/trigger.md +0 -0
- data/docs/dsl/by_method/unbind.md +0 -0
- data/docs/dsl/by_method/unbind_alias.md +0 -0
- data/docs/dsl/by_method/vertical.md +7 -0
- data/docs/dsl/by_method/views.md +0 -0
- data/docs/dsl/by_method/width.md +7 -0
- data/docs/dsl/by_method/write.md +0 -0
- data/examples/284_slow_rendering.rb +6 -3
- data/examples/dsl_alignment.rb +16 -14
- data/examples/dsl_colours.rb +17 -14
- data/examples/dsl_demo_groups.rb +3 -0
- data/examples/dsl_editor.rb +13 -10
- data/examples/dsl_hello_worlds.rb +2 -0
- data/examples/dsl_horizontal_alignment.rb +14 -27
- data/examples/dsl_menus.rb +2 -0
- data/examples/dsl_vertical_alignment.rb +35 -27
- data/examples/views/empty_template.rb +3 -1
- data/examples/views/full_screen.rb +100 -0
- data/examples/views/line.rb +5 -2
- data/examples/views/lines.rb +5 -2
- data/examples/views/lines_alignment.rb +5 -2
- data/examples/views/lines_line_stream.rb +14 -18
- data/examples/views/lines_line_streams.rb +5 -3
- data/examples/views/lines_line_streams_stream.rb +16 -21
- data/examples/views/lines_line_streams_stream_stream.rb +5 -8
- data/examples/views/lines_streams.rb +5 -7
- data/examples/views/lines_streams_stream.rb +5 -8
- data/lib/vedeu.rb +16 -0
- data/lib/vedeu/all.rb +11 -8
- data/lib/vedeu/application/application_controller.rb +2 -0
- data/lib/vedeu/application/application_helper.rb +2 -0
- data/lib/vedeu/application/application_view.rb +4 -2
- data/lib/vedeu/application/controller.rb +2 -0
- data/lib/vedeu/application/helper.rb +2 -0
- data/lib/vedeu/application/view.rb +2 -0
- data/lib/vedeu/boolean.rb +2 -0
- data/lib/vedeu/borders/all.rb +2 -1
- data/lib/vedeu/borders/border.rb +5 -3
- data/lib/vedeu/borders/caption.rb +2 -0
- data/lib/vedeu/borders/dsl.rb +37 -160
- data/lib/vedeu/borders/refresh.rb +3 -1
- data/lib/vedeu/borders/repository.rb +8 -2
- data/lib/vedeu/borders/title.rb +3 -1
- data/lib/vedeu/buffers/all.rb +2 -0
- data/lib/vedeu/buffers/buffer.rb +4 -2
- data/lib/vedeu/buffers/empty.rb +2 -0
- data/lib/vedeu/buffers/null.rb +2 -0
- data/lib/vedeu/buffers/refresh.rb +2 -0
- data/lib/vedeu/buffers/repository.rb +2 -0
- data/lib/vedeu/buffers/terminal.rb +6 -14
- data/lib/vedeu/buffers/view.rb +2 -0
- data/lib/vedeu/cells/all.rb +2 -0
- data/lib/vedeu/cells/border.rb +2 -0
- data/lib/vedeu/cells/borders/all.rb +2 -0
- data/lib/vedeu/cells/borders/bottom_horizontal.rb +2 -0
- data/lib/vedeu/cells/borders/bottom_left.rb +2 -0
- data/lib/vedeu/cells/borders/bottom_right.rb +2 -0
- data/lib/vedeu/cells/borders/corner.rb +2 -0
- data/lib/vedeu/cells/borders/horizontal.rb +2 -0
- data/lib/vedeu/cells/borders/left_vertical.rb +2 -0
- data/lib/vedeu/cells/borders/right_vertical.rb +2 -0
- data/lib/vedeu/cells/borders/top_horizontal.rb +2 -0
- data/lib/vedeu/cells/borders/top_left.rb +2 -0
- data/lib/vedeu/cells/borders/top_right.rb +2 -0
- data/lib/vedeu/cells/borders/vertical.rb +2 -0
- data/lib/vedeu/cells/char.rb +2 -0
- data/lib/vedeu/cells/clear.rb +3 -1
- data/lib/vedeu/cells/empty.rb +6 -4
- data/lib/vedeu/cells/escape.rb +4 -2
- data/lib/vedeu/cells/html.rb +2 -0
- data/lib/vedeu/cells/json.rb +2 -0
- data/lib/vedeu/coercers/alignment.rb +2 -0
- data/lib/vedeu/coercers/all.rb +2 -0
- data/lib/vedeu/coercers/colour.rb +3 -1
- data/lib/vedeu/coercers/colour_attributes.rb +2 -0
- data/lib/vedeu/coercers/horizontal_alignment.rb +2 -0
- data/lib/vedeu/coercers/vertical_alignment.rb +2 -0
- data/lib/vedeu/colours/all.rb +2 -0
- data/lib/vedeu/colours/background.rb +3 -1
- data/lib/vedeu/colours/backgrounds.rb +3 -5
- data/lib/vedeu/colours/colour.rb +2 -0
- data/lib/vedeu/colours/foreground.rb +3 -1
- data/lib/vedeu/colours/foregrounds.rb +3 -5
- data/lib/vedeu/colours/repository.rb +2 -0
- data/lib/vedeu/colours/translator.rb +5 -3
- data/lib/vedeu/colours/validator.rb +3 -1
- data/lib/vedeu/common.rb +17 -8
- data/lib/vedeu/configuration/all.rb +4 -2
- data/lib/vedeu/configuration/api.rb +5 -15
- data/lib/vedeu/configuration/configuration.rb +14 -27
- data/lib/vedeu/cursors/all.rb +2 -0
- data/lib/vedeu/cursors/coordinate.rb +4 -2
- data/lib/vedeu/cursors/cursor.rb +7 -5
- data/lib/vedeu/cursors/dsl.rb +2 -0
- data/lib/vedeu/cursors/move.rb +2 -0
- data/lib/vedeu/cursors/refresh.rb +3 -1
- data/lib/vedeu/cursors/reposition.rb +2 -0
- data/lib/vedeu/cursors/repository.rb +2 -0
- data/lib/vedeu/distributed/all.rb +2 -0
- data/lib/vedeu/distributed/client.rb +5 -3
- data/lib/vedeu/distributed/server.rb +17 -15
- data/lib/vedeu/distributed/subprocess.rb +4 -2
- data/lib/vedeu/distributed/test_application.rb +2 -0
- data/lib/vedeu/distributed/uri.rb +3 -1
- data/lib/vedeu/dsl/all.rb +2 -0
- data/lib/vedeu/dsl/attributes.rb +7 -5
- data/lib/vedeu/dsl/border.rb +2 -0
- data/lib/vedeu/dsl/cursors.rb +2 -0
- data/lib/vedeu/dsl/dsl.rb +3 -1
- data/lib/vedeu/dsl/elements.rb +14 -8
- data/lib/vedeu/dsl/geometry.rb +2 -0
- data/lib/vedeu/dsl/presentation.rb +2 -0
- data/lib/vedeu/dsl/string/align.rb +2 -0
- data/lib/vedeu/dsl/string/all.rb +2 -0
- data/lib/vedeu/dsl/string/text.rb +2 -0
- data/lib/vedeu/dsl/string/truncate.rb +2 -0
- data/lib/vedeu/dsl/string/wordwrap.rb +3 -1
- data/lib/vedeu/dsl/use.rb +2 -0
- data/lib/vedeu/dsl/view.rb +5 -3
- data/lib/vedeu/dsl/views.rb +4 -2
- data/lib/vedeu/editor/all.rb +2 -0
- data/lib/vedeu/editor/collection.rb +2 -0
- data/lib/vedeu/editor/cropper.rb +3 -1
- data/lib/vedeu/editor/cursor.rb +4 -2
- data/lib/vedeu/editor/delete.rb +2 -0
- data/lib/vedeu/editor/document.rb +3 -1
- data/lib/vedeu/editor/editor.rb +2 -0
- data/lib/vedeu/editor/insert.rb +16 -6
- data/lib/vedeu/editor/item.rb +2 -0
- data/lib/vedeu/editor/line.rb +2 -0
- data/lib/vedeu/editor/lines.rb +2 -0
- data/lib/vedeu/editor/repository.rb +2 -0
- data/lib/vedeu/error.rb +9 -4
- data/lib/vedeu/esc/actions.rb +17 -15
- data/lib/vedeu/esc/all.rb +2 -0
- data/lib/vedeu/esc/background.rb +36 -34
- data/lib/vedeu/esc/borders.rb +14 -12
- data/lib/vedeu/esc/colours.rb +12 -8
- data/lib/vedeu/esc/esc.rb +16 -14
- data/lib/vedeu/esc/foreground.rb +36 -34
- data/lib/vedeu/esc/mouse.rb +6 -4
- data/lib/vedeu/events/aliases.rb +3 -1
- data/lib/vedeu/events/all.rb +2 -0
- data/lib/vedeu/events/collection.rb +2 -0
- data/lib/vedeu/events/event.rb +21 -9
- data/lib/vedeu/events/repository.rb +2 -0
- data/lib/vedeu/events/trigger.rb +3 -1
- data/lib/vedeu/geometries/all.rb +2 -0
- data/lib/vedeu/geometries/area/all.rb +2 -0
- data/lib/vedeu/geometries/area/area.rb +46 -18
- data/lib/vedeu/geometries/area/dimension.rb +7 -0
- data/lib/vedeu/geometries/area/x_dimension.rb +2 -0
- data/lib/vedeu/geometries/area/y_dimension.rb +2 -0
- data/lib/vedeu/geometries/dsl/all.rb +2 -0
- data/lib/vedeu/geometries/dsl/dsl.rb +2 -0
- data/lib/vedeu/geometries/dsl/grid.rb +2 -0
- data/lib/vedeu/geometries/dsl/validator.rb +6 -4
- data/lib/vedeu/geometries/geometry.rb +4 -2
- data/lib/vedeu/geometries/move.rb +3 -1
- data/lib/vedeu/geometries/position.rb +4 -2
- data/lib/vedeu/geometries/positionable.rb +2 -0
- data/lib/vedeu/geometries/repository.rb +2 -0
- data/lib/vedeu/groups/all.rb +2 -0
- data/lib/vedeu/groups/clear.rb +2 -0
- data/lib/vedeu/groups/dsl.rb +3 -1
- data/lib/vedeu/groups/group.rb +3 -1
- data/lib/vedeu/groups/refresh.rb +4 -2
- data/lib/vedeu/groups/repository.rb +2 -0
- data/lib/vedeu/input/all.rb +2 -0
- data/lib/vedeu/input/capture.rb +4 -2
- data/lib/vedeu/input/dsl.rb +8 -6
- data/lib/vedeu/input/key.rb +3 -1
- data/lib/vedeu/input/keymap.rb +5 -3
- data/lib/vedeu/input/keys.rb +2 -0
- data/lib/vedeu/input/mapper.rb +7 -5
- data/lib/vedeu/input/mouse.rb +4 -2
- data/lib/vedeu/input/raw.rb +2 -0
- data/lib/vedeu/input/read.rb +3 -1
- data/lib/vedeu/input/repository.rb +2 -0
- data/lib/vedeu/input/store.rb +2 -0
- data/lib/vedeu/input/translator.rb +3 -1
- data/lib/vedeu/interfaces/all.rb +2 -0
- data/lib/vedeu/interfaces/clear.rb +7 -5
- data/lib/vedeu/interfaces/dsl.rb +4 -2
- data/lib/vedeu/interfaces/interface.rb +4 -2
- data/lib/vedeu/interfaces/null.rb +2 -0
- data/lib/vedeu/interfaces/repository.rb +2 -0
- data/lib/vedeu/logging/all.rb +2 -1
- data/lib/vedeu/logging/clock_time.rb +2 -0
- data/lib/vedeu/logging/debug.rb +32 -44
- data/lib/vedeu/logging/lockless_log_device.rb +3 -1
- data/lib/vedeu/logging/log.rb +13 -39
- data/lib/vedeu/logging/mono_logger.rb +3 -1
- data/lib/vedeu/logging/timer.rb +7 -19
- data/lib/vedeu/menus/all.rb +2 -0
- data/lib/vedeu/menus/dsl.rb +2 -0
- data/lib/vedeu/menus/menu.rb +3 -1
- data/lib/vedeu/menus/repository.rb +2 -0
- data/lib/vedeu/models/all.rb +2 -0
- data/lib/vedeu/models/focus.rb +7 -5
- data/lib/vedeu/models/page.rb +3 -1
- data/lib/vedeu/models/row.rb +2 -0
- data/lib/vedeu/models/toggleable.rb +2 -0
- data/lib/vedeu/null/all.rb +2 -0
- data/lib/vedeu/null/generic.rb +2 -0
- data/lib/vedeu/output/all.rb +2 -0
- data/lib/vedeu/output/compressor.rb +9 -7
- data/lib/vedeu/output/compressor_cache.rb +3 -1
- data/lib/vedeu/output/output.rb +2 -0
- data/lib/vedeu/output/refresh.rb +3 -1
- data/lib/vedeu/output/viewport.rb +4 -2
- data/lib/vedeu/output/write.rb +2 -0
- data/lib/vedeu/plugins/plugin.rb +5 -3
- data/lib/vedeu/plugins/plugins.rb +5 -3
- data/lib/vedeu/presentation/all.rb +2 -0
- data/lib/vedeu/presentation/background.rb +2 -0
- data/lib/vedeu/presentation/colour.rb +2 -0
- data/lib/vedeu/presentation/foreground.rb +2 -0
- data/lib/vedeu/presentation/presentation.rb +4 -2
- data/lib/vedeu/presentation/style.rb +2 -0
- data/lib/vedeu/presentation/styles.rb +2 -0
- data/lib/vedeu/renderers/all.rb +10 -22
- data/lib/vedeu/renderers/file.rb +4 -2
- data/lib/vedeu/renderers/html.rb +19 -19
- data/lib/vedeu/renderers/json.rb +2 -0
- data/lib/vedeu/renderers/options.rb +2 -0
- data/lib/vedeu/renderers/terminal.rb +2 -0
- data/lib/vedeu/renderers/text.rb +2 -0
- data/lib/vedeu/repositories/all.rb +2 -0
- data/lib/vedeu/repositories/assemblage.rb +2 -0
- data/lib/vedeu/repositories/collection.rb +2 -0
- data/lib/vedeu/repositories/defaults.rb +2 -0
- data/lib/vedeu/repositories/model.rb +3 -1
- data/lib/vedeu/repositories/parent.rb +2 -0
- data/lib/vedeu/repositories/registerable.rb +2 -0
- data/lib/vedeu/repositories/repositories.rb +3 -1
- data/lib/vedeu/repositories/repository.rb +8 -6
- data/lib/vedeu/repositories/store.rb +3 -1
- data/lib/vedeu/runtime/all.rb +2 -0
- data/lib/vedeu/runtime/application.rb +2 -0
- data/lib/vedeu/runtime/bootstrap.rb +10 -8
- data/lib/vedeu/runtime/flags.rb +2 -0
- data/lib/vedeu/runtime/launcher.rb +5 -3
- data/lib/vedeu/runtime/main_loop.rb +3 -1
- data/lib/vedeu/runtime/router.rb +11 -14
- data/lib/vedeu/runtime/traps.rb +2 -0
- data/lib/vedeu/templating/all.rb +2 -0
- data/lib/vedeu/templating/decoder.rb +2 -0
- data/lib/vedeu/templating/encoder.rb +3 -1
- data/lib/vedeu/templating/helpers.rb +5 -3
- data/lib/vedeu/templating/template.rb +4 -2
- data/lib/vedeu/templating/view_template.rb +2 -0
- data/lib/vedeu/terminal/all.rb +2 -0
- data/lib/vedeu/terminal/mode.rb +2 -0
- data/lib/vedeu/terminal/terminal.rb +9 -34
- data/lib/vedeu/version.rb +3 -1
- data/lib/vedeu/views/all.rb +2 -0
- data/lib/vedeu/views/char.rb +5 -7
- data/lib/vedeu/views/chars.rb +3 -1
- data/lib/vedeu/views/composition.rb +2 -0
- data/lib/vedeu/views/default_attributes.rb +4 -2
- data/lib/vedeu/views/html_char.rb +18 -15
- data/lib/vedeu/views/line.rb +2 -0
- data/lib/vedeu/views/lines.rb +3 -1
- data/lib/vedeu/views/stream.rb +2 -0
- data/lib/vedeu/views/streams.rb +3 -1
- data/lib/vedeu/views/value.rb +2 -0
- data/lib/vedeu/views/view.rb +4 -3
- data/lib/vedeu/views/views.rb +2 -0
- data/test/lib/vedeu/application/application_controller_test.rb +2 -0
- data/test/lib/vedeu/application/application_helper_test.rb +2 -0
- data/test/lib/vedeu/application/application_view_test.rb +2 -0
- data/test/lib/vedeu/application/controller_test.rb +2 -0
- data/test/lib/vedeu/application/helper_test.rb +2 -0
- data/test/lib/vedeu/application/view_test.rb +2 -0
- data/test/lib/vedeu/boolean_test.rb +2 -0
- data/test/lib/vedeu/borders/border_test.rb +2 -0
- data/test/lib/vedeu/borders/caption_test.rb +2 -0
- data/test/lib/vedeu/borders/dsl_test.rb +6 -0
- data/test/lib/vedeu/borders/refresh_test.rb +2 -0
- data/test/lib/vedeu/borders/repository_test.rb +2 -0
- data/test/lib/vedeu/borders/title_test.rb +2 -0
- data/test/lib/vedeu/buffers/buffer_test.rb +2 -0
- data/test/lib/vedeu/buffers/empty_test.rb +2 -0
- data/test/lib/vedeu/buffers/null_test.rb +2 -0
- data/test/lib/vedeu/buffers/refresh_test.rb +2 -0
- data/test/lib/vedeu/buffers/repository_test.rb +2 -0
- data/test/lib/vedeu/buffers/terminal_test.rb +2 -0
- data/test/lib/vedeu/buffers/view_test.rb +2 -0
- data/test/lib/vedeu/cells/border_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/bottom_horizontal_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/bottom_left_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/bottom_right_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/corner_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/horizontal_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/left_vertical_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/right_vertical_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/top_horizontal_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/top_left_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/top_right_test.rb +2 -0
- data/test/lib/vedeu/cells/borders/vertical_test.rb +2 -0
- data/test/lib/vedeu/cells/char_test.rb +2 -0
- data/test/lib/vedeu/cells/clear_test.rb +2 -0
- data/test/lib/vedeu/cells/empty_test.rb +2 -0
- data/test/lib/vedeu/cells/escape_test.rb +2 -0
- data/test/lib/vedeu/cells/html_test.rb +2 -0
- data/test/lib/vedeu/cells/json_test.rb +2 -0
- data/test/lib/vedeu/coercers/alignment_test.rb +2 -0
- data/test/lib/vedeu/coercers/colour_attributes_test.rb +2 -0
- data/test/lib/vedeu/coercers/colour_test.rb +2 -0
- data/test/lib/vedeu/coercers/horizontal_alignment_test.rb +2 -0
- data/test/lib/vedeu/coercers/vertical_alignment_test.rb +2 -0
- data/test/lib/vedeu/colours/background_test.rb +2 -0
- data/test/lib/vedeu/colours/backgrounds_test.rb +2 -0
- data/test/lib/vedeu/colours/colour_test.rb +2 -0
- data/test/lib/vedeu/colours/foreground_test.rb +2 -0
- data/test/lib/vedeu/colours/foregrounds_test.rb +2 -0
- data/test/lib/vedeu/colours/repository_test.rb +2 -0
- data/test/lib/vedeu/colours/translator_test.rb +2 -0
- data/test/lib/vedeu/colours/validator_test.rb +2 -0
- data/test/lib/vedeu/common_test.rb +39 -6
- data/test/lib/vedeu/configuration/api_test.rb +37 -18
- data/test/lib/vedeu/configuration/configuration_test.rb +4 -2
- data/test/lib/vedeu/cursors/coordinate_test.rb +2 -0
- data/test/lib/vedeu/cursors/cursor_test.rb +2 -0
- data/test/lib/vedeu/cursors/dsl_test.rb +2 -0
- data/test/lib/vedeu/cursors/move_test.rb +2 -0
- data/test/lib/vedeu/cursors/refresh_test.rb +2 -0
- data/test/lib/vedeu/cursors/reposition_test.rb +2 -0
- data/test/lib/vedeu/cursors/repository_test.rb +2 -0
- data/test/lib/vedeu/distributed/client_test.rb +2 -0
- data/test/lib/vedeu/distributed/server_test.rb +2 -0
- data/test/lib/vedeu/distributed/subprocess_test.rb +2 -0
- data/test/lib/vedeu/distributed/test_application_test.rb +2 -0
- data/test/lib/vedeu/distributed/uri_test.rb +2 -0
- data/test/lib/vedeu/dsl/attributes_test.rb +2 -0
- data/test/lib/vedeu/dsl/border_test.rb +2 -0
- data/test/lib/vedeu/dsl/cursors_test.rb +2 -0
- data/test/lib/vedeu/dsl/dsl_test.rb +2 -0
- data/test/lib/vedeu/dsl/elements_test.rb +2 -0
- data/test/lib/vedeu/dsl/geometry_test.rb +2 -0
- data/test/lib/vedeu/dsl/presentation_test.rb +2 -0
- data/test/lib/vedeu/dsl/string/align_test.rb +2 -0
- data/test/lib/vedeu/dsl/string/text_test.rb +2 -0
- data/test/lib/vedeu/dsl/string/truncate_test.rb +2 -0
- data/test/lib/vedeu/dsl/string/wordwrap_test.rb +2 -0
- data/test/lib/vedeu/dsl/use_test.rb +2 -0
- data/test/lib/vedeu/dsl/view_test.rb +2 -0
- data/test/lib/vedeu/dsl/views_test.rb +2 -0
- data/test/lib/vedeu/editor/collection_test.rb +2 -0
- data/test/lib/vedeu/editor/cropper_test.rb +2 -0
- data/test/lib/vedeu/editor/cursor_test.rb +2 -0
- data/test/lib/vedeu/editor/delete_test.rb +2 -0
- data/test/lib/vedeu/editor/document_test.rb +2 -0
- data/test/lib/vedeu/editor/editor_test.rb +2 -0
- data/test/lib/vedeu/editor/insert_test.rb +2 -0
- data/test/lib/vedeu/editor/item_test.rb +2 -0
- data/test/lib/vedeu/editor/line_test.rb +2 -0
- data/test/lib/vedeu/editor/lines_test.rb +2 -0
- data/test/lib/vedeu/editor/repository_test.rb +2 -0
- data/test/lib/vedeu/error_test.rb +2 -0
- data/test/lib/vedeu/esc/actions_test.rb +2 -0
- data/test/lib/vedeu/esc/background_test.rb +2 -0
- data/test/lib/vedeu/esc/borders_test.rb +2 -0
- data/test/lib/vedeu/esc/colours_test.rb +2 -0
- data/test/lib/vedeu/esc/esc_test.rb +2 -0
- data/test/lib/vedeu/esc/foreground_test.rb +2 -0
- data/test/lib/vedeu/esc/mouse_test.rb +2 -0
- data/test/lib/vedeu/events/aliases_test.rb +2 -0
- data/test/lib/vedeu/events/collection_test.rb +2 -0
- data/test/lib/vedeu/events/event_test.rb +2 -0
- data/test/lib/vedeu/events/repository_test.rb +2 -0
- data/test/lib/vedeu/events/trigger_test.rb +2 -0
- data/test/lib/vedeu/geometries/area/area_test.rb +54 -26
- data/test/lib/vedeu/geometries/area/dimension_test.rb +2 -0
- data/test/lib/vedeu/geometries/area/x_dimension_test.rb +2 -0
- data/test/lib/vedeu/geometries/area/y_dimension_test.rb +2 -0
- data/test/lib/vedeu/geometries/dsl/dsl_test.rb +2 -0
- data/test/lib/vedeu/geometries/dsl/grid_test.rb +2 -0
- data/test/lib/vedeu/geometries/dsl/validator_test.rb +2 -0
- data/test/lib/vedeu/geometries/geometry_test.rb +2 -0
- data/test/lib/vedeu/geometries/move_test.rb +2 -0
- data/test/lib/vedeu/geometries/position_test.rb +2 -0
- data/test/lib/vedeu/geometries/positionable_test.rb +2 -0
- data/test/lib/vedeu/geometries/repository_test.rb +2 -0
- data/test/lib/vedeu/groups/clear_test.rb +2 -0
- data/test/lib/vedeu/groups/dsl_test.rb +2 -0
- data/test/lib/vedeu/groups/group_test.rb +2 -0
- data/test/lib/vedeu/groups/refresh_test.rb +2 -0
- data/test/lib/vedeu/groups/repository_test.rb +2 -0
- data/test/lib/vedeu/input/capture_test.rb +2 -0
- data/test/lib/vedeu/input/dsl_test.rb +2 -0
- data/test/lib/vedeu/input/key_test.rb +2 -0
- data/test/lib/vedeu/input/keymap_test.rb +2 -0
- data/test/lib/vedeu/input/keys_test.rb +2 -0
- data/test/lib/vedeu/input/mapper_test.rb +2 -0
- data/test/lib/vedeu/input/mouse_test.rb +2 -0
- data/test/lib/vedeu/input/raw_test.rb +2 -0
- data/test/lib/vedeu/input/read_test.rb +2 -0
- data/test/lib/vedeu/input/repository_test.rb +2 -0
- data/test/lib/vedeu/input/store_test.rb +2 -0
- data/test/lib/vedeu/input/translator_test.rb +2 -0
- data/test/lib/vedeu/interfaces/clear_test.rb +2 -0
- data/test/lib/vedeu/interfaces/dsl_test.rb +2 -0
- data/test/lib/vedeu/interfaces/interface_test.rb +2 -0
- data/test/lib/vedeu/interfaces/null_test.rb +2 -0
- data/test/lib/vedeu/interfaces/repository_test.rb +2 -0
- data/test/lib/vedeu/logging/clock_time_test.rb +2 -0
- data/test/lib/vedeu/logging/debug_test.rb +37 -9
- data/test/lib/vedeu/logging/lockless_log_device_test.rb +2 -0
- data/test/lib/vedeu/logging/log_test.rb +2 -0
- data/test/lib/vedeu/logging/mono_logger_test.rb +2 -0
- data/test/lib/vedeu/logging/timer_test.rb +2 -0
- data/test/lib/vedeu/menus/dsl_test.rb +2 -0
- data/test/lib/vedeu/menus/menu_test.rb +2 -0
- data/test/lib/vedeu/menus/repository_test.rb +2 -0
- data/test/lib/vedeu/models/focus_test.rb +2 -0
- data/test/lib/vedeu/models/page_test.rb +2 -0
- data/test/lib/vedeu/models/row_test.rb +2 -0
- data/test/lib/vedeu/models/toggleable_test.rb +2 -0
- data/test/lib/vedeu/null/generic_test.rb +2 -0
- data/test/lib/vedeu/output/compressor_cache_test.rb +2 -0
- data/test/lib/vedeu/output/compressor_test.rb +2 -0
- data/test/lib/vedeu/output/output_test.rb +2 -0
- data/test/lib/vedeu/output/refresh_test.rb +2 -0
- data/test/lib/vedeu/output/viewport_test.rb +2 -0
- data/test/lib/vedeu/output/write_test.rb +2 -0
- data/test/lib/vedeu/plugins/plugin_test.rb +2 -0
- data/test/lib/vedeu/plugins/plugins_test.rb +2 -0
- data/test/lib/vedeu/presentation/background_test.rb +2 -0
- data/test/lib/vedeu/presentation/colour_test.rb +2 -0
- data/test/lib/vedeu/presentation/foreground_test.rb +2 -0
- data/test/lib/vedeu/presentation/presentation_test.rb +2 -0
- data/test/lib/vedeu/presentation/style_test.rb +2 -0
- data/test/lib/vedeu/presentation/styles_test.rb +2 -0
- data/test/lib/vedeu/renderers/all_test.rb +4 -95
- data/test/lib/vedeu/renderers/file_test.rb +2 -0
- data/test/lib/vedeu/renderers/html_test.rb +28 -1
- data/test/lib/vedeu/renderers/json_test.rb +2 -0
- data/test/lib/vedeu/renderers/options_test.rb +2 -0
- data/test/lib/vedeu/renderers/terminal_test.rb +2 -0
- data/test/lib/vedeu/renderers/text_test.rb +2 -0
- data/test/lib/vedeu/repositories/assemblage_test.rb +2 -0
- data/test/lib/vedeu/repositories/collection_test.rb +2 -0
- data/test/lib/vedeu/repositories/defaults_test.rb +2 -0
- data/test/lib/vedeu/repositories/model_test.rb +2 -0
- data/test/lib/vedeu/repositories/registerable_test.rb +2 -0
- data/test/lib/vedeu/repositories/repositories_test.rb +2 -0
- data/test/lib/vedeu/repositories/repository_test.rb +2 -0
- data/test/lib/vedeu/repositories/store_test.rb +2 -0
- data/test/lib/vedeu/runtime/application_test.rb +2 -0
- data/test/lib/vedeu/runtime/bootstrap_test.rb +2 -0
- data/test/lib/vedeu/runtime/flags_test.rb +2 -0
- data/test/lib/vedeu/runtime/launcher_test.rb +2 -0
- data/test/lib/vedeu/runtime/main_loop_test.rb +2 -0
- data/test/lib/vedeu/runtime/router_test.rb +2 -0
- data/test/lib/vedeu/runtime/traps_test.rb +2 -0
- data/test/lib/vedeu/templating/decoder_test.rb +2 -0
- data/test/lib/vedeu/templating/encoder_test.rb +2 -0
- data/test/lib/vedeu/templating/helpers_test.rb +2 -0
- data/test/lib/vedeu/templating/template_test.rb +2 -0
- data/test/lib/vedeu/templating/view_template_test.rb +2 -0
- data/test/lib/vedeu/terminal/mode_test.rb +2 -0
- data/test/lib/vedeu/terminal/terminal_test.rb +2 -0
- data/test/lib/vedeu/views/char_test.rb +2 -0
- data/test/lib/vedeu/views/chars_test.rb +2 -0
- data/test/lib/vedeu/views/composition_test.rb +2 -0
- data/test/lib/vedeu/views/default_attributes_test.rb +2 -0
- data/test/lib/vedeu/views/html_char_test.rb +2 -0
- data/test/lib/vedeu/views/line_test.rb +2 -0
- data/test/lib/vedeu/views/lines_test.rb +2 -0
- data/test/lib/vedeu/views/stream_test.rb +2 -0
- data/test/lib/vedeu/views/streams_test.rb +2 -0
- data/test/lib/vedeu/views/value_test.rb +2 -0
- data/test/lib/vedeu/views/view_test.rb +2 -0
- data/test/lib/vedeu/views/views_test.rb +2 -0
- data/test/lib/vedeu_test.rb +21 -3
- data/test/support/examples/material_colours_app.rb +17 -1
- data/test/support/helpers/model_test_class.rb +2 -0
- data/test/support/helpers/presentation_colour_test_class.rb +2 -0
- data/test/test_helper.rb +3 -22
- data/vedeu.gemspec +0 -3
- metadata +105 -52
- data/docs/debugging.md +0 -18
- data/lib/vedeu/borders/set_attribute.rb +0 -73
- data/lib/vedeu/logging/ips.rb +0 -66
- data/test/lib/vedeu/borders/set_attribute_test.rb +0 -62
- data/test/lib/vedeu/logging/ips_test.rb +0 -52
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
3
5
|
require 'bundler/setup'
|
4
6
|
require 'vedeu'
|
5
7
|
|
@@ -26,18 +28,13 @@ class DSLApp
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
29
|
-
Vedeu.keymap '_global_' do
|
30
|
-
key('q') { Vedeu.exit }
|
31
|
-
end
|
32
|
-
|
33
|
-
# vedeu/dsl/stream.rb:16:in `stream': wrong number of arguments (1 for 0)
|
34
31
|
Vedeu.render do
|
35
32
|
view(:main_interface) do
|
36
33
|
lines do
|
37
34
|
line do
|
38
35
|
streams do
|
39
|
-
stream 'v->ls->l->
|
40
|
-
stream 'v->ls->l->
|
36
|
+
stream 'v->ls->l->ss->stream 1', { foreground: '#ffff00' }
|
37
|
+
stream 'v->ls->l->ss->stream 2', { foreground: '#00ffff' }
|
41
38
|
end
|
42
39
|
end
|
43
40
|
end
|
@@ -48,6 +45,6 @@ class DSLApp
|
|
48
45
|
Vedeu::Launcher.execute!(argv)
|
49
46
|
end
|
50
47
|
|
51
|
-
end #
|
48
|
+
end # DSLApp
|
52
49
|
|
53
50
|
DSLApp.start
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
3
5
|
require 'bundler/setup'
|
4
6
|
require 'vedeu'
|
5
7
|
|
@@ -26,16 +28,12 @@ class DSLApp
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
29
|
-
Vedeu.keymap '_global_' do
|
30
|
-
key('q') { Vedeu.exit }
|
31
|
-
end
|
32
|
-
|
33
31
|
Vedeu.render do
|
34
32
|
view(:test1_interface) do
|
35
33
|
lines do
|
36
34
|
streams do
|
37
|
-
text '
|
38
|
-
text '
|
35
|
+
text 'v->ls->ss->text 1', { foreground: '#00ff00' }
|
36
|
+
text 'v->ls->ss->text 2', { foreground: '#0000ff' }
|
39
37
|
end
|
40
38
|
end
|
41
39
|
end
|
@@ -45,6 +43,6 @@ class DSLApp
|
|
45
43
|
Vedeu::Launcher.execute!(argv)
|
46
44
|
end
|
47
45
|
|
48
|
-
end #
|
46
|
+
end # DSLApp
|
49
47
|
|
50
48
|
DSLApp.start
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
3
5
|
require 'bundler/setup'
|
4
6
|
require 'vedeu'
|
5
7
|
|
@@ -26,17 +28,12 @@ class DSLApp
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
29
|
-
Vedeu.keymap '_global_' do
|
30
|
-
key('q') { Vedeu.exit }
|
31
|
-
end
|
32
|
-
|
33
|
-
# vedeu/dsl/stream.rb:16:in `stream': wrong number of arguments (1 for 0)
|
34
31
|
Vedeu.render do
|
35
32
|
view(:test1_interface) do
|
36
33
|
lines do
|
37
34
|
streams do
|
38
|
-
stream '
|
39
|
-
stream '
|
35
|
+
stream 'v->ls->ss->stream 1', { foreground: '#00ff00' }
|
36
|
+
stream 'v->ls->ss->stream 2', { foreground: '#ff0000' }
|
40
37
|
end
|
41
38
|
end
|
42
39
|
end
|
@@ -46,6 +43,6 @@ class DSLApp
|
|
46
43
|
Vedeu::Launcher.execute!(argv)
|
47
44
|
end
|
48
45
|
|
49
|
-
end #
|
46
|
+
end # DSLApp
|
50
47
|
|
51
48
|
DSLApp.start
|
data/lib/vedeu.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Ruby standard libraries
|
2
4
|
require 'base64'
|
3
5
|
require 'date'
|
@@ -25,6 +27,20 @@ module Vedeu
|
|
25
27
|
extend Forwardable
|
26
28
|
extend self
|
27
29
|
|
30
|
+
# @param gem_name [String]
|
31
|
+
# @raise [Vedeu::Error::Fatal] When the required gem is not
|
32
|
+
# available.
|
33
|
+
# @return [Boolean]
|
34
|
+
def requires_gem!(gem_name)
|
35
|
+
require gem_name if Gem::Specification.find_by_name(gem_name)
|
36
|
+
|
37
|
+
true
|
38
|
+
|
39
|
+
rescue Gem::LoadError
|
40
|
+
raise Vedeu::Error::Fatal,
|
41
|
+
"Vedeu requires '#{gem_name}' for this functionality."
|
42
|
+
end
|
43
|
+
|
28
44
|
end # Vedeu
|
29
45
|
|
30
46
|
require 'vedeu/all'
|
data/lib/vedeu/all.rb
CHANGED
@@ -1,23 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'vedeu/version'
|
4
|
+
|
1
5
|
require 'vedeu/boolean'
|
2
6
|
require 'vedeu/common'
|
3
7
|
require 'vedeu/error'
|
4
|
-
|
8
|
+
|
9
|
+
require 'vedeu/configuration/all'
|
10
|
+
require 'vedeu/esc/all'
|
11
|
+
require 'vedeu/logging/all'
|
5
12
|
|
6
13
|
require 'vedeu/coercers/all'
|
7
14
|
require 'vedeu/repositories/all'
|
8
|
-
|
9
|
-
require 'vedeu/esc/all'
|
10
15
|
require 'vedeu/colours/all'
|
11
|
-
require 'vedeu/configuration/all'
|
12
16
|
require 'vedeu/events/all'
|
13
17
|
|
14
|
-
require 'vedeu/logging/all'
|
15
|
-
require 'vedeu/runtime/all'
|
16
18
|
require 'vedeu/terminal/all'
|
17
19
|
require 'vedeu/presentation/all'
|
18
|
-
require 'vedeu/output/all'
|
19
20
|
require 'vedeu/renderers/all'
|
20
|
-
require 'vedeu/
|
21
|
+
require 'vedeu/output/all'
|
21
22
|
require 'vedeu/null/all'
|
22
23
|
require 'vedeu/views/all'
|
23
24
|
require 'vedeu/cells/all'
|
@@ -37,3 +38,5 @@ require 'vedeu/interfaces/all'
|
|
37
38
|
require 'vedeu/menus/all'
|
38
39
|
require 'vedeu/templating/all'
|
39
40
|
require 'vedeu/plugins/all'
|
41
|
+
|
42
|
+
require 'vedeu/runtime/all'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vedeu
|
2
4
|
|
3
5
|
# Provides the mechanism to render views for the client application.
|
@@ -33,7 +35,7 @@ module Vedeu
|
|
33
35
|
def render
|
34
36
|
fail Vedeu::Error::NotImplemented,
|
35
37
|
'The subclass of Vedeu::ApplicationView must implement the #render' \
|
36
|
-
'method.'
|
38
|
+
'method.'
|
37
39
|
end
|
38
40
|
|
39
41
|
protected
|
@@ -51,7 +53,7 @@ module Vedeu
|
|
51
53
|
# @return [String]
|
52
54
|
def template(value)
|
53
55
|
@template = Vedeu::Configuration.base_path +
|
54
|
-
"/app/views/templates/#{value}.erb"
|
56
|
+
"/app/views/templates/#{value}.erb"
|
55
57
|
end
|
56
58
|
|
57
59
|
end # ApplicationView
|
data/lib/vedeu/boolean.rb
CHANGED
data/lib/vedeu/borders/all.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vedeu
|
2
4
|
|
3
5
|
# Borders are defined by name for each of the client application's
|
@@ -39,4 +41,3 @@ require 'vedeu/borders/border'
|
|
39
41
|
require 'vedeu/borders/dsl'
|
40
42
|
require 'vedeu/borders/refresh'
|
41
43
|
require 'vedeu/borders/repository'
|
42
|
-
require 'vedeu/borders/set_attribute'
|
data/lib/vedeu/borders/border.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vedeu
|
2
4
|
|
3
5
|
module Borders
|
@@ -296,13 +298,13 @@ module Vedeu
|
|
296
298
|
bottom_horizontal: nil,
|
297
299
|
bottom_left: nil,
|
298
300
|
bottom_right: nil,
|
299
|
-
caption: ''
|
301
|
+
caption: '',
|
300
302
|
client: nil,
|
301
303
|
colour: nil,
|
302
304
|
enabled: false,
|
303
305
|
horizontal: Vedeu::EscapeSequences::Borders.horizontal,
|
304
306
|
left_vertical: nil,
|
305
|
-
name: ''
|
307
|
+
name: '',
|
306
308
|
parent: nil,
|
307
309
|
repository: Vedeu.borders,
|
308
310
|
right_vertical: nil,
|
@@ -311,7 +313,7 @@ module Vedeu
|
|
311
313
|
show_right: true,
|
312
314
|
show_top: true,
|
313
315
|
style: nil,
|
314
|
-
title: ''
|
316
|
+
title: '',
|
315
317
|
top_horizontal: nil,
|
316
318
|
top_left: nil,
|
317
319
|
top_right: nil,
|
data/lib/vedeu/borders/dsl.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vedeu
|
2
4
|
|
3
5
|
module Borders
|
@@ -11,14 +13,22 @@ module Vedeu
|
|
11
13
|
include Vedeu::DSL::Presentation
|
12
14
|
include Vedeu::DSL::Use
|
13
15
|
|
14
|
-
#
|
15
|
-
# the
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
16
|
+
# {include:file:docs/dsl/by_method/border.md}
|
17
|
+
# @param name [String|Symbol] The name of the interface or view
|
18
|
+
# to which this border belongs.
|
19
|
+
# @param block [Proc]
|
20
|
+
# @macro raise_requires_block
|
21
|
+
# @raise [Vedeu::Error::MissingRequired] When the name is not
|
22
|
+
# given.
|
23
|
+
# @return [Vedeu::Borders::Border]
|
24
|
+
def self.border(name, &block)
|
25
|
+
fail Vedeu::Error::MissingRequired unless name
|
26
|
+
fail Vedeu::Error::RequiresBlock unless block_given?
|
27
|
+
|
28
|
+
Vedeu::Borders::Border.build(enabled: true, name: name, &block).store
|
29
|
+
end
|
30
|
+
|
31
|
+
# {include:file:docs/dsl/by_method/bottom_left.md}
|
22
32
|
# @param char [String] Character to be used as the bottom left
|
23
33
|
# border character.
|
24
34
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -31,14 +41,7 @@ module Vedeu
|
|
31
41
|
end
|
32
42
|
alias_method :bottom_left=, :bottom_left
|
33
43
|
|
34
|
-
#
|
35
|
-
# of the border.
|
36
|
-
#
|
37
|
-
# Vedeu.border :border_demo do
|
38
|
-
# bottom_right '+'
|
39
|
-
# # ... some code
|
40
|
-
# end
|
41
|
-
#
|
44
|
+
# {include:file:docs/dsl/by_method/bottom_right.md}
|
42
45
|
# @param char [String] Character to be used as the bottom right
|
43
46
|
# border character.
|
44
47
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -51,13 +54,7 @@ module Vedeu
|
|
51
54
|
end
|
52
55
|
alias_method :bottom_right=, :bottom_right
|
53
56
|
|
54
|
-
#
|
55
|
-
#
|
56
|
-
# Vedeu.border :border_demo do
|
57
|
-
# disable!
|
58
|
-
# # ... some other code (will be ignored)
|
59
|
-
# end
|
60
|
-
#
|
57
|
+
# {include:file:docs/dsl/by_method/disable.md}
|
61
58
|
# @return [Boolean]
|
62
59
|
def disable!
|
63
60
|
model.enabled = false
|
@@ -69,16 +66,9 @@ module Vedeu
|
|
69
66
|
|
70
67
|
model.enabled
|
71
68
|
end
|
69
|
+
alias_method :disabled!, :disable!
|
72
70
|
|
73
|
-
#
|
74
|
-
# (Borders are enabled by default when defined for an
|
75
|
-
# interface).
|
76
|
-
#
|
77
|
-
# Vedeu.border :border_demo do
|
78
|
-
# enable!
|
79
|
-
# # ... some code
|
80
|
-
# end
|
81
|
-
#
|
71
|
+
# {include:file:docs/dsl/by_method/enable.md}
|
82
72
|
# @return [Boolean]
|
83
73
|
def enable!
|
84
74
|
model.enabled = true
|
@@ -90,15 +80,9 @@ module Vedeu
|
|
90
80
|
|
91
81
|
model.enabled
|
92
82
|
end
|
83
|
+
alias_method :enabled!, :enable!
|
93
84
|
|
94
|
-
#
|
95
|
-
# of the border.
|
96
|
-
#
|
97
|
-
# Vedeu.border :border_demo do
|
98
|
-
# top_horizontal '-'
|
99
|
-
# # ... some code
|
100
|
-
# end
|
101
|
-
#
|
85
|
+
# {include:file:docs/dsl/by_method/top_horizontal.md}
|
102
86
|
# @param char [String] Character to be used as the top
|
103
87
|
# horizontal border character.
|
104
88
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -112,14 +96,7 @@ module Vedeu
|
|
112
96
|
end
|
113
97
|
alias_method :top_horizontal=, :top_horizontal
|
114
98
|
|
115
|
-
#
|
116
|
-
# part of the border.
|
117
|
-
#
|
118
|
-
# Vedeu.border :border_demo do
|
119
|
-
# bottom_horizontal '-'
|
120
|
-
# # ... some code
|
121
|
-
# end
|
122
|
-
#
|
99
|
+
# {include:file:docs/dsl/by_method/bottom_horizontal.md}
|
123
100
|
# @param char [String] Character to be used as the bottom
|
124
101
|
# horizontal border character.
|
125
102
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -133,14 +110,7 @@ module Vedeu
|
|
133
110
|
end
|
134
111
|
alias_method :bottom_horizontal=, :bottom_horizontal
|
135
112
|
|
136
|
-
#
|
137
|
-
# border.
|
138
|
-
#
|
139
|
-
# Vedeu.border :border_demo do
|
140
|
-
# horizontal '-'
|
141
|
-
# # ... some code
|
142
|
-
# end
|
143
|
-
#
|
113
|
+
# {include:file:docs/dsl/by_method/horizontal.md}
|
144
114
|
# @param char [String] Character to be used as the horizontal
|
145
115
|
# border character.
|
146
116
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -153,16 +123,7 @@ module Vedeu
|
|
153
123
|
end
|
154
124
|
alias_method :horizontal=, :horizontal
|
155
125
|
|
156
|
-
#
|
157
|
-
#
|
158
|
-
# Vedeu.border :border_demo do
|
159
|
-
# bottom true # or...
|
160
|
-
# bottom false # or...
|
161
|
-
# hide_bottom! # or...
|
162
|
-
# show_bottom!
|
163
|
-
# # ... some code
|
164
|
-
# end
|
165
|
-
#
|
126
|
+
# {include:file:docs/dsl/by_method/bottom.md}
|
166
127
|
# @param value [Boolean] All values evaluate as true except nil
|
167
128
|
# and false.
|
168
129
|
# @return [Boolean]
|
@@ -188,16 +149,7 @@ module Vedeu
|
|
188
149
|
bottom(true)
|
189
150
|
end
|
190
151
|
|
191
|
-
#
|
192
|
-
#
|
193
|
-
# Vedeu.border :border_demo do
|
194
|
-
# left true # or...
|
195
|
-
# left false # or...
|
196
|
-
# hide_left! # or...
|
197
|
-
# show_left!
|
198
|
-
# # ... some code
|
199
|
-
# end
|
200
|
-
#
|
152
|
+
# {include:file:docs/dsl/by_method/left.md}
|
201
153
|
# @param value [Boolean] All values evaluate as true except nil
|
202
154
|
# and false.
|
203
155
|
# @return [Boolean]
|
@@ -223,16 +175,7 @@ module Vedeu
|
|
223
175
|
left(true)
|
224
176
|
end
|
225
177
|
|
226
|
-
#
|
227
|
-
#
|
228
|
-
# Vedeu.border :border_demo do
|
229
|
-
# right true # or...
|
230
|
-
# right false # or...
|
231
|
-
# hide_right! # or...
|
232
|
-
# show_right!
|
233
|
-
# # ... some code
|
234
|
-
# end
|
235
|
-
#
|
178
|
+
# {include:file:docs/dsl/by_method/right.md}
|
236
179
|
# @param value [Boolean] All values evaluate as true except nil
|
237
180
|
# and false.
|
238
181
|
# @return [Boolean]
|
@@ -258,18 +201,7 @@ module Vedeu
|
|
258
201
|
right(true)
|
259
202
|
end
|
260
203
|
|
261
|
-
#
|
262
|
-
# title.
|
263
|
-
#
|
264
|
-
# Vedeu.border :border_demo do
|
265
|
-
# title 'My Cool Title'
|
266
|
-
# # ... some code
|
267
|
-
# end
|
268
|
-
#
|
269
|
-
# produces, depending on other customisations:
|
270
|
-
#
|
271
|
-
# +- My Cool Title --------------------------------+
|
272
|
-
#
|
204
|
+
# {include:file:docs/dsl/by_method/title.md}
|
273
205
|
# @param value [String] The title.
|
274
206
|
# @return [String]
|
275
207
|
def title(value)
|
@@ -278,18 +210,7 @@ module Vedeu
|
|
278
210
|
end
|
279
211
|
alias_method :title=, :title
|
280
212
|
|
281
|
-
#
|
282
|
-
# caption.
|
283
|
-
#
|
284
|
-
# Vedeu.border :border_demo do
|
285
|
-
# caption 'My Cool Caption'
|
286
|
-
# # ... some code
|
287
|
-
# end
|
288
|
-
#
|
289
|
-
# produces, depending on other customisations:
|
290
|
-
#
|
291
|
-
# +------------------------------ My Cool Caption -+
|
292
|
-
#
|
213
|
+
# {include:file:docs/dsl/by_method/caption.md}
|
293
214
|
# @param value [String] The caption.
|
294
215
|
# @return [String]
|
295
216
|
def caption(value)
|
@@ -298,16 +219,7 @@ module Vedeu
|
|
298
219
|
end
|
299
220
|
alias_method :caption=, :caption
|
300
221
|
|
301
|
-
#
|
302
|
-
#
|
303
|
-
# Vedeu.border :border_demo do
|
304
|
-
# top true # or...
|
305
|
-
# top false # or...
|
306
|
-
# hide_top! # or...
|
307
|
-
# show_top!
|
308
|
-
# # ... some code
|
309
|
-
# end
|
310
|
-
#
|
222
|
+
# {include:file:docs/dsl/by_method/top.md}
|
311
223
|
# @param value [Boolean] All values evaluate as true except nil
|
312
224
|
# and false.
|
313
225
|
# @return [Boolean]
|
@@ -333,14 +245,7 @@ module Vedeu
|
|
333
245
|
top(true)
|
334
246
|
end
|
335
247
|
|
336
|
-
#
|
337
|
-
# the border.
|
338
|
-
#
|
339
|
-
# Vedeu.border :border_demo do
|
340
|
-
# top_left '+'
|
341
|
-
# # ... some code
|
342
|
-
# end
|
343
|
-
#
|
248
|
+
# {include:file:docs/dsl/by_method/top_left.md}
|
344
249
|
# @param char [String] Character to be used as the top left
|
345
250
|
# border character.
|
346
251
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -353,14 +258,7 @@ module Vedeu
|
|
353
258
|
end
|
354
259
|
alias_method :top_left=, :top_left
|
355
260
|
|
356
|
-
#
|
357
|
-
# the border.
|
358
|
-
#
|
359
|
-
# Vedeu.border :border_demo do
|
360
|
-
# top_right '+'
|
361
|
-
# # ... some code
|
362
|
-
# end
|
363
|
-
#
|
261
|
+
# {include:file:docs/dsl/by_method/top_right.md}
|
364
262
|
# @param char [String] Character to be used as the top right
|
365
263
|
# border character.
|
366
264
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -373,14 +271,7 @@ module Vedeu
|
|
373
271
|
end
|
374
272
|
alias_method :top_right=, :top_right
|
375
273
|
|
376
|
-
#
|
377
|
-
# the border.
|
378
|
-
#
|
379
|
-
# Vedeu.border :border_demo do
|
380
|
-
# left_vertical '|'
|
381
|
-
# # ... some code
|
382
|
-
# end
|
383
|
-
#
|
274
|
+
# {include:file:docs/dsl/by_method/left_vertical.md}
|
384
275
|
# @param char [String] Character to be used as the left vertical
|
385
276
|
# border character.
|
386
277
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -394,14 +285,7 @@ module Vedeu
|
|
394
285
|
end
|
395
286
|
alias_method :left_vertical=, :left_vertical
|
396
287
|
|
397
|
-
#
|
398
|
-
# of the border.
|
399
|
-
#
|
400
|
-
# Vedeu.border :border_demo do
|
401
|
-
# right_vertical '|'
|
402
|
-
# # ... some code
|
403
|
-
# end
|
404
|
-
#
|
288
|
+
# {include:file:docs/dsl/by_method/right_vertical.md}
|
405
289
|
# @param char [String] Character to be used as the right
|
406
290
|
# vertical border character.
|
407
291
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|
@@ -415,14 +299,7 @@ module Vedeu
|
|
415
299
|
end
|
416
300
|
alias_method :right_vertical=, :right_vertical
|
417
301
|
|
418
|
-
#
|
419
|
-
# border.
|
420
|
-
#
|
421
|
-
# Vedeu.border :border_demo do
|
422
|
-
# vertical '|'
|
423
|
-
# # ... some code
|
424
|
-
# end
|
425
|
-
#
|
302
|
+
# {include:file:docs/dsl/by_method/vertical.md}
|
426
303
|
# @param char [String] Character to be used as the vertical
|
427
304
|
# border character.
|
428
305
|
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
|