Module: Vedeu
- Included in:
- Vedeu
- Defined in:
- lib/vedeu.rb,
lib/vedeu/api.rb,
lib/vedeu/debug.rb,
lib/vedeu/traps.rb,
lib/vedeu/dsl/all.rb,
lib/vedeu/bindings.rb,
lib/vedeu/dsl/line.rb,
lib/vedeu/dsl/view.rb,
lib/vedeu/launcher.rb,
lib/vedeu/dsl/group.rb,
lib/vedeu/input/all.rb,
lib/vedeu/input/key.rb,
lib/vedeu/main_loop.rb,
lib/vedeu/cursor/all.rb,
lib/vedeu/dsl/stream.rb,
lib/vedeu/events/all.rb,
lib/vedeu/exceptions.rb,
lib/vedeu/input/keys.rb,
lib/vedeu/models/all.rb,
lib/vedeu/output/all.rb,
lib/vedeu/output/esc.rb,
lib/vedeu/application.rb,
lib/vedeu/buffers/all.rb,
lib/vedeu/input/input.rb,
lib/vedeu/models/menu.rb,
lib/vedeu/output/text.rb,
lib/vedeu/support/all.rb,
lib/vedeu/support/log.rb,
lib/vedeu/events/event.rb,
lib/vedeu/geometry/all.rb,
lib/vedeu/input/keymap.rb,
lib/vedeu/input/mapper.rb,
lib/vedeu/models/focus.rb,
lib/vedeu/models/group.rb,
lib/vedeu/models/model.rb,
lib/vedeu/output/style.rb,
lib/vedeu/cursor/cursor.rb,
lib/vedeu/dsl/interface.rb,
lib/vedeu/events/events.rb,
lib/vedeu/geometry/grid.rb,
lib/vedeu/output/border.rb,
lib/vedeu/output/colour.rb,
lib/vedeu/output/output.rb,
lib/vedeu/support/trace.rb,
lib/vedeu/buffers/buffer.rb,
lib/vedeu/dsl/shared/all.rb,
lib/vedeu/dsl/shared/use.rb,
lib/vedeu/events/trigger.rb,
lib/vedeu/geometry/limit.rb,
lib/vedeu/output/refresh.rb,
lib/vedeu/support/common.rb,
lib/vedeu/distributed/all.rb,
lib/vedeu/distributed/uri.rb,
lib/vedeu/dsl/composition.rb,
lib/vedeu/dsl/shared/text.rb,
lib/vedeu/models/geometry.rb,
lib/vedeu/models/view/all.rb,
lib/vedeu/output/renderer.rb,
lib/vedeu/output/viewport.rb,
lib/vedeu/output/wordwrap.rb,
lib/vedeu/support/visible.rb,
lib/vedeu/dsl/shared/style.rb,
lib/vedeu/models/view/char.rb,
lib/vedeu/models/view/line.rb,
lib/vedeu/output/html_char.rb,
lib/vedeu/repositories/all.rb,
lib/vedeu/support/sentence.rb,
lib/vedeu/support/template.rb,
lib/vedeu/support/terminal.rb,
lib/vedeu/configuration/all.rb,
lib/vedeu/configuration/api.rb,
lib/vedeu/configuration/cli.rb,
lib/vedeu/dsl/shared/colour.rb,
lib/vedeu/geometry/position.rb,
lib/vedeu/models/collection.rb,
lib/vedeu/models/view/chars.rb,
lib/vedeu/models/view/lines.rb,
lib/vedeu/output/background.rb,
lib/vedeu/output/compositor.rb,
lib/vedeu/output/foreground.rb,
lib/vedeu/output/translator.rb,
lib/vedeu/support/coercions.rb,
lib/vedeu/cursor/move_cursor.rb,
lib/vedeu/distributed/client.rb,
lib/vedeu/distributed/server.rb,
lib/vedeu/dsl/components/all.rb,
lib/vedeu/models/view/stream.rb,
lib/vedeu/dsl/components/menu.rb,
lib/vedeu/geometry/coordinate.rb,
lib/vedeu/models/view/streams.rb,
lib/vedeu/output/presentation.rb,
lib/vedeu/cursor/toggle_cursor.rb,
lib/vedeu/output/html_renderer.rb,
lib/vedeu/dsl/components/border.rb,
lib/vedeu/dsl/components/keymap.rb,
lib/vedeu/models/view/interface.rb,
lib/vedeu/output/index_position.rb,
lib/vedeu/output/position_index.rb,
lib/vedeu/output/virtual_buffer.rb,
lib/vedeu/buffers/display_buffer.rb,
lib/vedeu/distributed/subprocess.rb,
lib/vedeu/geometry/bounding_area.rb,
lib/vedeu/models/view/interfaces.rb,
lib/vedeu/dsl/components/geometry.rb,
lib/vedeu/models/view/composition.rb,
lib/vedeu/output/virtual_terminal.rb,
lib/vedeu/repositories/repository.rb,
lib/vedeu/geometry/content_geometry.rb,
lib/vedeu/configuration/configuration.rb,
lib/vedeu/geometry/position_validator.rb,
lib/vedeu/distributed/test_application.rb
Overview
Fixnum
Defined Under Namespace
Modules: API, Bindings, Coercions, Common, Config, DSL, DisplayBuffer, Distributed, Esc, Focus, Model, Presentation, Refresh, Terminal, Traps, VirtualBuffer Classes: Application, Background, Border, Borders, BoundingArea, Buffer, Buffers, Char, Chars, Colour, Composition, Compositor, Configuration, ContentGeometry, Coordinate, Cursor, Cursors, Event, Events, EventsRepository, Foreground, Geometries, Geometry, Grid, Group, Groups, HTMLChar, HTMLRenderer, IndexPosition, Input, Interface, Interfaces, InterfacesRepository, Key, Keymap, Keymaps, Keys, Launcher, Limit, Line, Lines, Log, MainLoop, Mapper, Menu, Menus, MonoLogger, MoveCursor, Output, Position, PositionIndex, PositionValidator, Renderer, Repository, Sentence, Stream, Streams, Style, Subprocess, Template, TestApplication, Text, ToggleCursor, Trace, Translator, Trigger, Viewport, VirtualTerminal, Visible, Wordwrap
Constant Summary collapse
- Exceptions =
ModelNotFound: Raised with Vedeu attempts to access a named model that does
not exist.InvalidSyntax: Raised when Vedeu attempts to parse a view or
{Vedeu.interface} and encounters a problem.MissingRequired: Raised when a name is not provided for a model when
attempting to store it in a repository.ModeSwitch: Raised intentionally when the client application wishes to
switch between cooked and raw (or vice versa) terminal modes. Vedeu is hard-wired to use the `Escape` key to trigger this change for the time being.NotImplemented: Raised to remind me (or client application developers) that
the subclass implements the functionality sought.OutOfRange: Raised when trying to access an interface column less than 1 or
greater than 12. Vedeu is hard-wired to a 12-column layout for the time being.VedeuInterrupt: Raised when Vedeu wishes to exit.
%w[ ModelNotFound InvalidSyntax MissingRequired ModeSwitch NotImplemented OutOfRange VedeuInterrupt ]
Class Method Summary collapse
-
.debug(filename = 'profile.html', &block) ⇒ Object
Helps to debug a running application by providing a stack trace of its execution upon exiting.
- .focusable ⇒ Vedeu::Focus
-
.included(receiver) ⇒ void
When Vedeu is included within one of your classes, you should have all API methods at your disposal.
Instance Method Summary collapse
-
#included(receiver) ⇒ void
When Vedeu is included within one of your classes, you should have all API methods at your disposal.
Class Method Details
.debug(filename = 'profile.html', &block) ⇒ Object
Helps to debug a running application by providing a stack trace of its execution upon exiting.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/vedeu/debug.rb', line 8 def self.debug(filename = 'profile.html', &block) require 'ruby-prof' RubyProf.start yield result = RubyProf.stop result.eliminate_methods!([/^Array/, /^Hash/]) File.open('/tmp/' + filename, 'w') do |file| RubyProf::CallStackPrinter.new(result).print(file) # Used with QTCacheGrind to analyse performance. # RubyProf::CallTreePrinter.new(result).print(file) end end |
.focusable ⇒ Vedeu::Focus
25 26 27 |
# File 'lib/vedeu.rb', line 25 def self.focusable @focusable ||= Vedeu::Focus end |
.included(receiver) ⇒ void
This method returns an undefined value.
When Vedeu is included within one of your classes, you should have all API methods at your disposal.
39 40 41 42 |
# File 'lib/vedeu.rb', line 39 def included(receiver) receiver.send(:include, API) receiver.extend(API) end |
Instance Method Details
#included(receiver) ⇒ void
This method returns an undefined value.
When Vedeu is included within one of your classes, you should have all API methods at your disposal.
39 40 41 42 |
# File 'lib/vedeu.rb', line 39 def included(receiver) receiver.send(:include, API) receiver.extend(API) end |