Module: Netzke::Basepack::Columns::ClassMethods

Defined in:
lib/netzke/basepack/columns.rb

Instance Method Summary collapse

Instance Method Details

#column(name, &block) ⇒ Object

Adds/overrides a column config, e.g.:

column :title do |c|
  c.flex = 1
end

If a new column is declared, it gets appended to the list of default columns.



64
65
66
67
68
# File 'lib/netzke/basepack/columns.rb', line 64

def column(name, &block)
  method_name = COLUMN_METHOD_NAME % name
  define_method(method_name, &block)
  self.declared_columns = [*declared_columns, name]
end