Class: Uh::Layout::Column
- Inherits:
-
Object
- Object
- Uh::Layout::Column
- Extended by:
- Forwardable
- Includes:
- GeoAccessors
- Defined in:
- lib/uh/layout/column.rb,
lib/uh/layout/column/arranger.rb
Defined Under Namespace
Classes: Arranger
Instance Attribute Summary collapse
-
#clients ⇒ Object
readonly
Returns the value of attribute clients.
-
#geo ⇒ Object
readonly
Returns the value of attribute geo.
Instance Method Summary collapse
- #<<(client) ⇒ Object
- #arrange_clients ⇒ Object
-
#initialize(geo) ⇒ Column
constructor
A new instance of Column.
- #show_hide_clients ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(geo) ⇒ Column
Returns a new instance of Column.
14 15 16 17 |
# File 'lib/uh/layout/column.rb', line 14 def initialize(geo) @geo = geo.dup @clients = Container.new end |
Instance Attribute Details
#clients ⇒ Object (readonly)
Returns the value of attribute clients.
12 13 14 |
# File 'lib/uh/layout/column.rb', line 12 def clients @clients end |
#geo ⇒ Object (readonly)
Returns the value of attribute geo.
12 13 14 |
# File 'lib/uh/layout/column.rb', line 12 def geo @geo end |
Instance Method Details
#<<(client) ⇒ Object
23 24 25 26 27 |
# File 'lib/uh/layout/column.rb', line 23 def <<(client) client.geo = @geo.dup @clients << client self end |
#arrange_clients ⇒ Object
29 30 31 32 33 34 |
# File 'lib/uh/layout/column.rb', line 29 def arrange_clients @clients.each do |client| client.geo = @geo.dup client.moveresize end end |
#show_hide_clients ⇒ Object
36 37 38 39 40 41 |
# File 'lib/uh/layout/column.rb', line 36 def show_hide_clients @clients.each do |client| client.hide unless client.hidden? || @clients.current == client end @clients.current.show if @clients.current && @clients.current.hidden? end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/uh/layout/column.rb', line 19 def to_s "COL geo: #{@geo}" end |