Class: Uh::Layout::Dumper
- Inherits:
-
Object
- Object
- Uh::Layout::Dumper
- Defined in:
- lib/uh/layout/dumper.rb
Instance Method Summary collapse
-
#initialize(layout) ⇒ Dumper
constructor
A new instance of Dumper.
- #to_s ⇒ Object
Constructor Details
#initialize(layout) ⇒ Dumper
Returns a new instance of Dumper.
4 5 6 |
# File 'lib/uh/layout/dumper.rb', line 4 def initialize layout @layout = layout end |
Instance Method Details
#to_s ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/uh/layout/dumper.rb', line 8 def to_s @layout.screens.inject '' do |m, screen| m << "%s%s\n" % [@layout.current_screen?(screen) ? ?* : ' ', screen] screen.views.each do |view| m << " %s%s\n" % [screen.current_view?(view) ? ?* : ' ', view] view.columns.each do |column| m << " %s%s\n" % [ view.current_column?(column) ? ?* : ' ', column ] column.clients.each do |client| m << " %s%s\n" % [ column.current_client?(client) ? ?* : ' ', client ] end end end m end end |