Method: NattyUI::Features::Table#style_row
- Defined in:
- lib/natty-ui/wrapper/table.rb
#style_row(row, style) ⇒ Table
Change style of one or more rows.
201 202 203 204 205 206 207 208 209 |
# File 'lib/natty-ui/wrapper/table.rb', line 201 def style_row(row, style) if row.is_a?(Integer) row = [row] elsif !row.is_a?(Enumerable) raise(TypeError, "invalid row value - #{row}") end row.each { |r| @rows[r]&.each { _1&.style = style } } self end |