class Uh::Layout::Arrangers::VertTile
Public Class Methods
new(entries, geo)
click to toggle source
# File lib/uh/layout/arrangers/vert_tile.rb, line 5 def initialize entries, geo @entries = entries @geo = geo end
Public Instance Methods
arrange()
click to toggle source
# File lib/uh/layout/arrangers/vert_tile.rb, line 10 def arrange entry_height = @geo.height / @entries.size - 1 @entries.each_with_index do |entry, i| entry.geo = @geo.dup entry.y = (entry_height + 1) * i entry.height = entry_height end end
each_visible() { |e| ... }
click to toggle source
# File lib/uh/layout/arrangers/vert_tile.rb, line 19 def each_visible @entries.each { |e| yield e } end