gavinlaking/vedeu — pull request #83 by gavinlaking (2014-08-24 22:18:39+00:00)
Title: Refactoring and improvements

- Minor refactor to Buffer to improve readability.
- Refactor Buffers and Buffer to know less.
- Replace #coerce_styles with Style class.
- Remove some methods in favour of attr_readers.
- Rename Attributes to Coercions.
- Add more documentation.
- Fix missing assertion.
- Refactor Events to not know about the event itself.
- Extracting Event from Events.
- Add placeholder @param and @return Yardoc tags.
- Add more tests.
- Add space around top and bottom of classes.
- Move API::Interface#colour in API::Helpers to reduce duplication.
- Handle centred interface geometry better;
We cannot use top and left in viewport_height and viewport_width
respectively, as their values depend on the current viewport size which
will change if the terminal is resized. x, y, height and width are now pretty much reserved for holding the values the client wanted to use, but should not be used to do any rendering.
- Interface DSL allows blocks to be passed to y and x;
If an interface (a) is using the 'use' directive, then if the interface (b) it is using changes geometry then the values (a) is using will be outdated. By using blocks, we can evaluate at call time, leading to less display corruption.