class BasicTableColor
Constants
- Animal
Attributes
animals[RW]
Public Class Methods
new()
click to toggle source
# File examples/basic_table_color.rb, line 80 def initialize @animals = [ AnimalPresenter.new('cat', 'meow', true), AnimalPresenter.new('dog', 'woof', true), AnimalPresenter.new('chicken', 'cock-a-doodle-doo', false), AnimalPresenter.new('horse', 'neigh', true), AnimalPresenter.new('cow', 'moo', true), ] end
Public Instance Methods
launch()
click to toggle source
# File examples/basic_table_color.rb, line 90 def launch window('Animals', 500, 200) { horizontal_box { table { text_color_column('Animal') text_color_column('Sound') checkbox_text_color_column('Description') image_text_color_column('GUI') background_color_column # must always be the last column and always expects data-binding model attribute `background_color` when binding to Array of models cell_rows <= [self, :animals, column_attributes: {'Animal' => :name_color, 'Sound' => :sound_color, 'Description' => :mammal_description_color, 'GUI' => :image_description_color}] } } }.show end