vedeu 0.6.10 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vedeu/all.rb +17 -103
  3. data/lib/vedeu/api/all.rb +15 -0
  4. data/lib/vedeu/api/internal.rb +4 -0
  5. data/lib/vedeu/application/all.rb +6 -0
  6. data/lib/vedeu/bindings/all.rb +32 -0
  7. data/lib/vedeu/bindings/bindings.rb +0 -14
  8. data/lib/vedeu/bindings/refresh.rb +8 -2
  9. data/lib/vedeu/bindings/system.rb +1 -0
  10. data/lib/vedeu/borders/border.rb +1 -1
  11. data/lib/vedeu/borders/repository.rb +1 -1
  12. data/lib/vedeu/buffers/buffer.rb +2 -4
  13. data/lib/vedeu/buffers/repository.rb +1 -1
  14. data/lib/vedeu/colours/background.rb +1 -1
  15. data/lib/vedeu/colours/backgrounds.rb +1 -1
  16. data/lib/vedeu/colours/foreground.rb +1 -1
  17. data/lib/vedeu/colours/foregrounds.rb +1 -1
  18. data/lib/vedeu/colours/translator.rb +4 -3
  19. data/lib/vedeu/configuration/api.rb +2 -1
  20. data/lib/vedeu/configuration/cli.rb +1 -1
  21. data/lib/vedeu/cursors/cursor.rb +26 -26
  22. data/lib/vedeu/cursors/repository.rb +1 -1
  23. data/lib/vedeu/distributed/all.rb +16 -0
  24. data/lib/vedeu/distributed/test_application.rb +3 -3
  25. data/lib/vedeu/dsl/all.rb +22 -0
  26. data/lib/vedeu/dsl/composition.rb +43 -40
  27. data/lib/vedeu/dsl/dsl.rb +6 -3
  28. data/lib/vedeu/dsl/group.rb +23 -16
  29. data/lib/vedeu/dsl/interface.rb +48 -38
  30. data/lib/vedeu/dsl/keymap.rb +6 -7
  31. data/lib/vedeu/dsl/line.rb +6 -3
  32. data/lib/vedeu/dsl/stream.rb +2 -1
  33. data/lib/vedeu/editor/cursor.rb +1 -3
  34. data/lib/vedeu/editor/document.rb +4 -5
  35. data/lib/vedeu/editor/documents.rb +1 -1
  36. data/lib/vedeu/editor/line.rb +2 -3
  37. data/lib/vedeu/editor/lines.rb +2 -3
  38. data/lib/vedeu/esc/all.rb +14 -0
  39. data/lib/vedeu/esc/colours.rb +8 -4
  40. data/lib/vedeu/esc/esc.rb +89 -84
  41. data/lib/vedeu/events/aliases.rb +1 -2
  42. data/lib/vedeu/events/collection.rb +1 -1
  43. data/lib/vedeu/events/event.rb +1 -1
  44. data/lib/vedeu/events/repository.rb +1 -1
  45. data/lib/vedeu/events/trigger.rb +11 -9
  46. data/lib/vedeu/geometry/dimension.rb +1 -3
  47. data/lib/vedeu/geometry/generic_coordinate.rb +1 -3
  48. data/lib/vedeu/geometry/geometry.rb +1 -1
  49. data/lib/vedeu/geometry/repository.rb +3 -3
  50. data/lib/vedeu/input/all.rb +3 -0
  51. data/lib/vedeu/input/keymap.rb +10 -11
  52. data/lib/vedeu/input/keymaps.rb +1 -1
  53. data/lib/vedeu/input/keys.rb +1 -1
  54. data/lib/vedeu/input/mapper.rb +14 -12
  55. data/lib/vedeu/logging/all.rb +3 -0
  56. data/lib/vedeu/logging/log.rb +4 -2
  57. data/lib/vedeu/menus/menu.rb +2 -4
  58. data/lib/vedeu/menus/repository.rb +1 -1
  59. data/lib/vedeu/models/all.rb +15 -0
  60. data/lib/vedeu/models/cell.rb +1 -1
  61. data/lib/vedeu/models/escape.rb +1 -1
  62. data/lib/vedeu/models/group.rb +4 -3
  63. data/lib/vedeu/models/groups.rb +1 -1
  64. data/lib/vedeu/models/interface.rb +1 -1
  65. data/lib/vedeu/models/interfaces.rb +1 -1
  66. data/lib/vedeu/models/views/char.rb +1 -1
  67. data/lib/vedeu/models/views/collections/chars.rb +1 -1
  68. data/lib/vedeu/models/views/collections/lines.rb +1 -1
  69. data/lib/vedeu/models/views/collections/streams.rb +1 -1
  70. data/lib/vedeu/models/views/collections/view_collection.rb +1 -1
  71. data/lib/vedeu/models/views/composition.rb +1 -1
  72. data/lib/vedeu/models/views/line.rb +8 -6
  73. data/lib/vedeu/models/views/stream.rb +1 -1
  74. data/lib/vedeu/models/views/view.rb +1 -1
  75. data/lib/vedeu/null/all.rb +12 -0
  76. data/lib/vedeu/output/clear/named_group.rb +2 -1
  77. data/lib/vedeu/output/clear/named_interface.rb +5 -4
  78. data/lib/vedeu/output/compressor.rb +1 -0
  79. data/lib/vedeu/output/output.rb +3 -0
  80. data/lib/vedeu/output/presentation/colour.rb +10 -10
  81. data/lib/vedeu/output/presentation/presentation.rb +9 -9
  82. data/lib/vedeu/output/presentation/style.rb +2 -2
  83. data/lib/vedeu/output/refresh/refresh.rb +35 -0
  84. data/lib/vedeu/output/refresh/refresh_group.rb +66 -0
  85. data/lib/vedeu/output/renderers/all.rb +17 -0
  86. data/lib/vedeu/output/renderers/escape_sequence.rb +4 -2
  87. data/lib/vedeu/output/renderers/file.rb +7 -6
  88. data/lib/vedeu/output/renderers/html.rb +9 -7
  89. data/lib/vedeu/output/renderers/null.rb +1 -1
  90. data/lib/vedeu/output/renderers/renderer_options.rb +24 -20
  91. data/lib/vedeu/output/renderers/terminal.rb +1 -1
  92. data/lib/vedeu/output/renderers/text.rb +1 -1
  93. data/lib/vedeu/output/wordwrap.rb +7 -4
  94. data/lib/vedeu/plugins/all.rb +2 -0
  95. data/lib/vedeu/repositories/all.rb +16 -0
  96. data/lib/vedeu/repositories/collection.rb +93 -89
  97. data/lib/vedeu/repositories/model.rb +113 -102
  98. data/lib/vedeu/repositories/registerable.rb +60 -56
  99. data/lib/vedeu/repositories/repository.rb +161 -156
  100. data/lib/vedeu/repositories/store.rb +70 -66
  101. data/lib/vedeu/runtime/all.rb +15 -0
  102. data/lib/vedeu/runtime/launcher.rb +19 -16
  103. data/lib/vedeu/templating/all.rb +6 -0
  104. data/lib/vedeu/terminal/all.rb +14 -0
  105. data/lib/vedeu/terminal/buffer.rb +8 -7
  106. data/lib/vedeu/terminal/mode.rb +11 -10
  107. data/lib/vedeu/terminal/terminal.rb +50 -45
  108. data/lib/vedeu/version.rb +1 -1
  109. data/test/lib/vedeu/cursors/cursor_test.rb +4 -2
  110. data/test/lib/vedeu/editor/cursor_test.rb +0 -3
  111. data/test/lib/vedeu/esc/esc_test.rb +58 -54
  112. data/test/lib/vedeu/events/collection_test.rb +1 -1
  113. data/test/lib/vedeu/input/keys_test.rb +1 -1
  114. data/test/lib/vedeu/input/mapper_test.rb +1 -1
  115. data/test/lib/vedeu/models/views/collections/chars_test.rb +1 -1
  116. data/test/lib/vedeu/models/views/collections/lines_test.rb +1 -1
  117. data/test/lib/vedeu/models/views/collections/streams_test.rb +1 -1
  118. data/test/lib/vedeu/models/views/collections/view_collection_test.rb +1 -1
  119. data/test/lib/vedeu/output/refresh/refresh_group_test.rb +43 -0
  120. data/test/lib/vedeu/output/refresh/refresh_test.rb +50 -0
  121. data/test/lib/vedeu/output/renderers/renderer_options_test.rb +8 -4
  122. data/test/lib/vedeu/output/renderers_test.rb +2 -1
  123. data/test/lib/vedeu/repositories/collection_test.rb +105 -101
  124. data/test/lib/vedeu/repositories/model_test.rb +56 -52
  125. data/test/lib/vedeu/repositories/registerable_test.rb +36 -32
  126. data/test/lib/vedeu/repositories/repository_test.rb +178 -174
  127. data/test/lib/vedeu/repositories/store_test.rb +109 -105
  128. data/test/support/examples/material_colours_app.rb +0 -1
  129. data/test/support/helpers/model_test_class.rb +50 -46
  130. data/test/test_helper.rb +2 -2
  131. metadata +21 -9
  132. data/lib/vedeu/refresh/refresh.rb +0 -31
  133. data/lib/vedeu/refresh/refresh_group.rb +0 -59
  134. data/out_ +0 -50
  135. data/test/lib/vedeu/refresh/refresh_group_test.rb +0 -39
  136. data/test/lib/vedeu/refresh/refresh_test.rb +0 -46
@@ -5,7 +5,7 @@ module Vedeu
5
5
  # A collection of {Vedeu::Views::View} instances.
6
6
  #
7
7
  # @api private
8
- class ViewCollection < Vedeu::Collection
8
+ class ViewCollection < Vedeu::Repositories::Collection
9
9
 
10
10
  end # ViewCollection
11
11
 
@@ -6,7 +6,7 @@ module Vedeu
6
6
  #
7
7
  class Composition
8
8
 
9
- include Vedeu::Model
9
+ include Vedeu::Repositories::Model
10
10
  include Vedeu::Presentation
11
11
 
12
12
  collection Vedeu::Views::ViewCollection
@@ -3,12 +3,12 @@ module Vedeu
3
3
  module Views
4
4
 
5
5
  # Represents a single row of the terminal. It is a container for
6
- # {Vedeu::Views::Stream} objects. A line's width is determined by the
7
- # {Vedeu::Geometry::Geometry} it belongs to.
6
+ # {Vedeu::Views::Stream} objects. A line's width is determined by
7
+ # the {Vedeu::Geometry::Geometry} it belongs to.
8
8
  #
9
9
  class Line
10
10
 
11
- include Vedeu::Model
11
+ include Vedeu::Repositories::Model
12
12
  include Vedeu::Presentation
13
13
 
14
14
  collection Vedeu::Views::Streams
@@ -45,7 +45,8 @@ module Vedeu
45
45
  end
46
46
  alias_method :<<, :add
47
47
 
48
- # Returns an array of all the characters with formatting for this line.
48
+ # Returns an array of all the characters with formatting for
49
+ # this line.
49
50
  #
50
51
  # @return [Array]
51
52
  # @see Vedeu::Views::Stream
@@ -57,14 +58,15 @@ module Vedeu
57
58
 
58
59
  # An object is equal when its values are the same.
59
60
  #
60
- # @param other [Vedeu::Collection]
61
+ # @param other [Vedeu::Repositories::Collection]
61
62
  # @return [Boolean]
62
63
  def eql?(other)
63
64
  self.class == other.class && value == other.value
64
65
  end
65
66
  alias_method :==, :eql?
66
67
 
67
- # Returns the size of the content in characters without formatting.
68
+ # Returns the size of the content in characters without
69
+ # formatting.
68
70
  #
69
71
  # @return [Fixnum]
70
72
  def size
@@ -8,7 +8,7 @@ module Vedeu
8
8
  #
9
9
  class Stream
10
10
 
11
- include Vedeu::Model
11
+ include Vedeu::Repositories::Model
12
12
  include Vedeu::Presentation
13
13
 
14
14
  collection Vedeu::Views::Chars
@@ -7,7 +7,7 @@ module Vedeu
7
7
  #
8
8
  class View
9
9
 
10
- include Vedeu::Model
10
+ include Vedeu::Repositories::Model
11
11
  include Vedeu::Presentation
12
12
 
13
13
  collection Vedeu::Views::Lines
@@ -0,0 +1,12 @@
1
+ module Vedeu
2
+
3
+ module Null
4
+
5
+ end # Null
6
+
7
+ end # Vedeu
8
+
9
+ require 'vedeu/null/null'
10
+ require 'vedeu/null/generic'
11
+ require 'vedeu/null/interface'
12
+ require 'vedeu/null/view'
@@ -1,6 +1,7 @@
1
1
  module Vedeu
2
2
 
3
- # Provides the mechanisms to clear an interface or group of interfaces.
3
+ # Provides the mechanisms to clear an interface or group of
4
+ # interfaces.
4
5
  #
5
6
  module Clear
6
7
 
@@ -1,6 +1,7 @@
1
1
  module Vedeu
2
2
 
3
- # Provides the mechanisms to clear an interface or group of interfaces.
3
+ # Provides the mechanisms to clear an interface or group of
4
+ # interfaces.
4
5
  #
5
6
  module Clear
6
7
 
@@ -57,9 +58,9 @@ module Vedeu
57
58
  end
58
59
 
59
60
  # For each visible line of the interface, set the foreground and
60
- # background colours to those specified when the interface was defined,
61
- # then starting write space characters over the area which the interface
62
- # occupies.
61
+ # background colours to those specified when the interface was
62
+ # defined, then starting write space characters over the area
63
+ # which the interface occupies.
63
64
  #
64
65
  # @return [Array<Array<Vedeu::Views::Char>>]
65
66
  def output
@@ -42,6 +42,7 @@ module Vedeu
42
42
 
43
43
  private
44
44
 
45
+ # @return [Array]
45
46
  def content
46
47
  return [] if output.nil? || output.empty?
47
48
 
@@ -1,5 +1,8 @@
1
1
  module Vedeu
2
2
 
3
+ # Classes within the Output namespace handle various aspects of
4
+ # rendering content.
5
+ #
3
6
  module Output
4
7
 
5
8
  # Sends the output to the renderers.
@@ -6,8 +6,8 @@ module Vedeu
6
6
  #
7
7
  module Colour
8
8
 
9
- # When the background colour for the model exists, return it, otherwise
10
- # returns the parent background colour, or an empty
9
+ # When the background colour for the model exists, return it,
10
+ # otherwise returns the parent background colour, or an empty
11
11
  # Vedeu::Colours::Background.
12
12
  #
13
13
  # @return [Vedeu::Colours::Background]
@@ -24,8 +24,8 @@ module Vedeu
24
24
  end
25
25
  end
26
26
 
27
- # Allows the setting of the background colour by coercing the given value
28
- # into a Vedeu::Colours::Background colour.
27
+ # Allows the setting of the background colour by coercing the
28
+ # given value into a Vedeu::Colours::Background colour.
29
29
  #
30
30
  # @return [Vedeu::Colours::Background]
31
31
  def background=(value)
@@ -48,16 +48,16 @@ module Vedeu
48
48
  end
49
49
  end
50
50
 
51
- # Allows the setting of the model's colour by coercing the given value
52
- # into a Vedeu::Colours::Colour.
51
+ # Allows the setting of the model's colour by coercing the given
52
+ # value into a Vedeu::Colours::Colour.
53
53
  #
54
54
  # @return [Vedeu::Colours::Colour]
55
55
  def colour=(value)
56
56
  @colour = Vedeu::Colours::Colour.coerce(value)
57
57
  end
58
58
 
59
- # When the foreground colour for the model exists, return it, otherwise
60
- # returns the parent foreground colour, or an empty
59
+ # When the foreground colour for the model exists, return it,
60
+ # otherwise returns the parent foreground colour, or an empty
61
61
  # Vedeu::Colours::Foreground.
62
62
  #
63
63
  # @return [Vedeu::Colours::Foreground]
@@ -74,8 +74,8 @@ module Vedeu
74
74
  end
75
75
  end
76
76
 
77
- # Allows the setting of the foreground colour by coercing the given value
78
- # into a Vedeu::Colours::Foreground colour.
77
+ # Allows the setting of the foreground colour by coercing the
78
+ # given value into a Vedeu::Colours::Foreground colour.
79
79
  #
80
80
  # @return [Vedeu::Colours::Foreground]
81
81
  def foreground=(value)
@@ -4,17 +4,17 @@ require 'vedeu/output/presentation/style'
4
4
 
5
5
  module Vedeu
6
6
 
7
- # This module allows the sharing of presentation concerns between the models:
8
- # Interface, View, Line and Stream.
7
+ # This module allows the sharing of presentation concerns between
8
+ # the models: Interface, View, Line and Stream.
9
9
  #
10
10
  module Presentation
11
11
 
12
12
  include Vedeu::Presentation::Colour
13
13
  include Vedeu::Presentation::Styles
14
14
 
15
- # Converts the colours and styles to escape sequences, and when the parent
16
- # model has previously set the colour and style, reverts back to that for
17
- # consistent formatting.
15
+ # Converts the colours and styles to escape sequences, and when
16
+ # the parent model has previously set the colour and style,
17
+ # reverts back to that for consistent formatting.
18
18
  #
19
19
  # @return [String] An escape sequence with value interpolated.
20
20
  def to_s
@@ -24,8 +24,8 @@ module Vedeu
24
24
 
25
25
  private
26
26
 
27
- # Renders the colour attributes of the receiver and yields (to then render
28
- # the styles).
27
+ # Renders the colour attributes of the receiver and yields (to
28
+ # then render the styles).
29
29
  #
30
30
  # @return [String]
31
31
  def render_colour
@@ -44,8 +44,8 @@ module Vedeu
44
44
  end
45
45
  end
46
46
 
47
- # Renders the style attributes of the receiver and yields (to then render
48
- # the next model, or finally, the content).
47
+ # Renders the style attributes of the receiver and yields (to
48
+ # then render the next model, or finally, the content).
49
49
  #
50
50
  # @return [String]
51
51
  def render_style
@@ -11,7 +11,7 @@ module Vedeu
11
11
  # be defined in either interfaces, for specific lines or within
12
12
  # streams. Styles are applied as encountered.
13
13
  #
14
- # @see Vedeu::Esc
14
+ # @see Vedeu::EscapeSequences::Esc
15
15
  #
16
16
  class Style
17
17
 
@@ -71,7 +71,7 @@ module Vedeu
71
71
  return '' unless present?(value)
72
72
 
73
73
  @sequences ||= Array(value).flatten.map do |v|
74
- Vedeu::Esc.string(v)
74
+ Vedeu::EscapeSequences::Esc.string(v)
75
75
  end.join
76
76
  end
77
77
  alias_method :escape_sequences, :to_s
@@ -0,0 +1,35 @@
1
+ module Vedeu
2
+
3
+ module Output
4
+
5
+ # @see Vedeu::Bindings::System#refresh!
6
+ class Refresh
7
+
8
+ # Refresh all registered interfaces.
9
+ #
10
+ # @return [Array<Vedeu::Models::Interface>]
11
+ def self.all
12
+ new.all
13
+ end
14
+
15
+ # Return a new instance of Vedeu::Output::Refresh.
16
+ #
17
+ # @return [Vedeu::Output::Refresh]
18
+ def initialize; end
19
+
20
+ # Refresh all registered interfaces.
21
+ #
22
+ # @return [Array<Vedeu::Models::Interface>]
23
+ def all
24
+ Vedeu.timer('Refreshing all') do
25
+ Vedeu.interfaces.zindexed.each do |interface|
26
+ Vedeu.trigger(:_refresh_, interface.name)
27
+ end
28
+ end
29
+ end
30
+
31
+ end # Refresh
32
+
33
+ end # Output
34
+
35
+ end # Vedeu
@@ -0,0 +1,66 @@
1
+ module Vedeu
2
+
3
+ module Output
4
+
5
+ # Refresh an interface, or collection of interfaces belonging to a
6
+ # group.
7
+ #
8
+ # The interfaces will be refreshed in z-index order, meaning that
9
+ # interfaces with a lower z-index will be drawn first. This means
10
+ # overlapping interfaces will be drawn as specified.
11
+ #
12
+ # @example
13
+ # Vedeu.trigger(:_refresh_group_, group_name)
14
+ #
15
+ class RefreshGroup
16
+
17
+ include Vedeu::Common
18
+
19
+ # @param name [String] The name of the group to be refreshed.
20
+ # @return [Array|Vedeu::Error::ModelNotFound] A collection of
21
+ # the names of interfaces refreshed, or an exception when the
22
+ # group was not found.
23
+ def self.by_name(name)
24
+ new(name).by_name
25
+ end
26
+
27
+ # Return a new instance of Vedeu::Output::RefreshGroup.
28
+ #
29
+ # @param name [String]
30
+ # @return [Vedeu::Output::RefreshGroup]
31
+ def initialize(name)
32
+ @name = name
33
+ end
34
+
35
+ # @return [void]
36
+ def by_name
37
+ Vedeu.timer("Refresh Group: '#{group_name}'") do
38
+ Vedeu.groups.by_name(group_name).by_zindex.each do |name|
39
+ Vedeu::Buffers::Refresh.by_name(name)
40
+ end
41
+ end
42
+ end
43
+
44
+ protected
45
+
46
+ # @!attribute [r] name
47
+ # @return [String]
48
+ attr_reader :name
49
+
50
+ private
51
+
52
+ # @raise [Vedeu::Error::MissingRequired] When the name is empty
53
+ # or nil.
54
+ # @return [String]
55
+ def group_name
56
+ return name if present?(name)
57
+
58
+ fail Vedeu::Error::MissingRequired,
59
+ 'Cannot refresh group with an empty group name.'
60
+ end
61
+
62
+ end # RefreshGroup
63
+
64
+ end # Output
65
+
66
+ end # Vedeu
@@ -0,0 +1,17 @@
1
+ module Vedeu
2
+
3
+ module Renderers
4
+
5
+ end # Renderers
6
+
7
+ end # Vedeu
8
+
9
+ require 'vedeu/output/renderers/renderer_options'
10
+ require 'vedeu/output/renderers/escape_sequence'
11
+ require 'vedeu/output/renderers/file'
12
+ require 'vedeu/output/renderers/html'
13
+ require 'vedeu/output/renderers/json'
14
+ require 'vedeu/output/renderers/null'
15
+ require 'vedeu/output/renderers/terminal'
16
+ require 'vedeu/output/renderers/text'
17
+ require 'vedeu/output/renderers'
@@ -6,7 +6,7 @@ module Vedeu
6
6
  #
7
7
  class EscapeSequence
8
8
 
9
- include Vedeu::RendererOptions
9
+ include Vedeu::Renderers::RendererOptions
10
10
 
11
11
  # Returns a new instance of Vedeu::Renderers::EscapeSequence.
12
12
  #
@@ -24,7 +24,9 @@ module Vedeu
24
24
  out = ''
25
25
 
26
26
  output.each do |row|
27
- row.each { |cell| out << Vedeu::Esc.escape(cell.to_s) }
27
+ row.each do |cell|
28
+ out << Vedeu::EscapeSequences::Esc.escape(cell.to_s)
29
+ end
28
30
  end
29
31
 
30
32
  out
@@ -6,16 +6,17 @@ module Vedeu
6
6
  #
7
7
  class File
8
8
 
9
- include Vedeu::RendererOptions
9
+ include Vedeu::Renderers::RendererOptions
10
10
 
11
11
  # Returns a new instance of Vedeu::Renderers::File.
12
12
  #
13
13
  # @param options [Hash]
14
- # @option options filename [String] Provide a filename for the output.
15
- # Defaults to 'out'.
16
- # @option options timestamp [Boolean] Append a timestamp to the filename.
17
- # @option options write_file [Boolean] Whether to write the file to the
18
- # given filename.
14
+ # @option options filename [String] Provide a filename for the
15
+ # output. Defaults to 'out'.
16
+ # @option options timestamp [Boolean] Append a timestamp to the
17
+ # filename.
18
+ # @option options write_file [Boolean] Whether to write the file
19
+ # to the given filename.
19
20
  # @return [Vedeu::Renderers::File]
20
21
  def initialize(options = {})
21
22
  @options = options || {}
@@ -13,15 +13,17 @@ module Vedeu
13
13
  # @option options content [String] Defaults to an empty string.
14
14
  # @option options end_tag [String] Defaults to '</td>'.
15
15
  # @option options end_row_tag [String] Defaults to '</tr>'.
16
- # @option options filename [String] Provide a filename for the output.
17
- # Defaults to 'out'.
18
- # @option options start_tag [String] Defaults to '<td' (note the end of
19
- # the tag is missing, this is so that inline styles can be added later).
16
+ # @option options filename [String] Provide a filename for the
17
+ # output. Defaults to 'out'.
18
+ # @option options start_tag [String] Defaults to '<td' (note the
19
+ # end of the tag is missing, this is so that inline styles can
20
+ # be added later).
20
21
  # @option options start_row_tag [String] Defaults to '<tr>'.
21
22
  # @option options template [String]
22
- # @option options timestamp [Boolean] Append a timestamp to the filename.
23
- # @option options write_file [Boolean] Whether to write the file to the
24
- # given filename.
23
+ # @option options timestamp [Boolean] Append a timestamp to the
24
+ # filename.
25
+ # @option options write_file [Boolean] Whether to write the file
26
+ # to the given filename.
25
27
  # @return [Vedeu::Renderers::HTML]
26
28
  def initialize(options = {})
27
29
  @options = options || {}
@@ -6,7 +6,7 @@ module Vedeu
6
6
  #
7
7
  class Null
8
8
 
9
- include Vedeu::RendererOptions
9
+ include Vedeu::Renderers::RendererOptions
10
10
 
11
11
  # Returns a new instance of Vedeu::Renderers::Null.
12
12
  #
@@ -1,28 +1,32 @@
1
1
  module Vedeu
2
2
 
3
- # Provides shared functionality to Vedeu::Renderer classes.
4
- #
5
- # :nocov:
6
- module RendererOptions
3
+ module Renderers
7
4
 
8
- private
9
-
10
- # Combines the options provided at instantiation with the default
11
- # values.
5
+ # Provides shared functionality to Vedeu::Renderer classes.
12
6
  #
13
- # @return [Hash<Symbol => void>]
14
- def options
15
- defaults.merge!(@options)
16
- end
7
+ # :nocov:
8
+ module RendererOptions
17
9
 
18
- # The default values for a new instance of this class.
19
- #
20
- # @return [Hash<Symbol => void>]
21
- def defaults
22
- {}
23
- end
10
+ private
11
+
12
+ # Combines the options provided at instantiation with the
13
+ # default values.
14
+ #
15
+ # @return [Hash<Symbol => void>]
16
+ def options
17
+ defaults.merge!(@options)
18
+ end
19
+
20
+ # The default values for a new instance of this class.
21
+ #
22
+ # @return [Hash<Symbol => void>]
23
+ def defaults
24
+ {}
25
+ end
26
+
27
+ end # RendererOptions
28
+ # :nocov:
24
29
 
25
- end # RendererOptions
26
- # :nocov:
30
+ end # Renderers
27
31
 
28
32
  end # Vedeu
@@ -7,7 +7,7 @@ module Vedeu
7
7
  #
8
8
  class Terminal
9
9
 
10
- include Vedeu::RendererOptions
10
+ include Vedeu::Renderers::RendererOptions
11
11
 
12
12
  # Returns a new instance of Vedeu::Renderers::Terminal.
13
13
  #
@@ -7,7 +7,7 @@ module Vedeu
7
7
  #
8
8
  class Text
9
9
 
10
- include Vedeu::RendererOptions
10
+ include Vedeu::Renderers::RendererOptions
11
11
 
12
12
  # Returns a new instance of Vedeu::Renderers::Text.
13
13
  #
@@ -146,10 +146,13 @@ module Vedeu
146
146
  options.fetch(:ellipsis)
147
147
  end
148
148
 
149
- # Returns the word wrapping mode. One of :default, :prune or :wrap;
150
- # :default = Renders the content as is.
151
- # :prune = Discards the remainder of the content line after width.
152
- # :wrap = Forces the content on to a new line after width.
149
+ # Returns the word wrapping mode. One of :default, :prune or
150
+ # :wrap;
151
+ # :default = Renders the content as is.
152
+ # :prune = Discards the remainder of the content line
153
+ # after width.
154
+ # :wrap = Forces the content on to a new line after
155
+ # width.
153
156
  # @return [Symbol]
154
157
  def mode
155
158
  options.fetch(:mode)
@@ -0,0 +1,2 @@
1
+ require 'vedeu/plugins/plugins'
2
+ require 'vedeu/plugins/plugin'
@@ -0,0 +1,16 @@
1
+ module Vedeu
2
+
3
+ # Provides all registered repositories.
4
+ #
5
+ module Repositories
6
+
7
+ end # Repositories
8
+
9
+ end # Vedeu
10
+
11
+ require 'vedeu/repositories/collection'
12
+ require 'vedeu/repositories/repositories'
13
+ require 'vedeu/repositories/model'
14
+ require 'vedeu/repositories/store'
15
+ require 'vedeu/repositories/registerable'
16
+ require 'vedeu/repositories/repository'