module Bumblebee::ColumnDsl
Defines a class-level interace for specifying columns.
Public Instance Methods
all_column_sets()
click to toggle source
# File lib/bumblebee/column_dsl.rb, line 27 def all_column_sets # the reverse preserves the order of inheritance to go from parent -> child ancestors.reverse_each.with_object(ColumnSet.new) do |ancestor, set| ancestor < Template ? set.add(ancestor.columns) : set end end
all_columns()
click to toggle source
# File lib/bumblebee/column_dsl.rb, line 34 def all_columns all_column_sets.columns end
column(header, opts = {})
click to toggle source
# File lib/bumblebee/column_dsl.rb, line 21 def column(header, opts = {}) column_set.column(header, opts) self end
column_set()
click to toggle source
# File lib/bumblebee/column_dsl.rb, line 17 def column_set @column_set ||= ColumnSet.new end