Sha256: 77d27d5d1bcd6cfd1707182266dcfc7931bc271b025151b43f229dacf148482d
Contents?: true
Size: 675 Bytes
Versions: 2
Compression:
Stored size: 675 Bytes
Contents
module PaginatedTable class RowDescription attr_reader :columns def initialize(table, options, description_proc) @table = table @options = options @columns = [] description_proc.call(self) if description_proc end def title @options.fetch(:title, :header) end def cycle @options.fetch(:cycle, %w(odd even)) end def hidden @options.fetch(:hidden, false) end def data_type @options.fetch(:data_type, false) end def column(*args, &block) @columns << ColumnDescription.new(self, *args, &block) end def colspan(span) @table.colspan(span) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
paginated_table-0.0.9 | lib/paginated_table/row_description.rb |
paginated_table-0.0.8 | lib/paginated_table/row_description.rb |