Module: Phlexi::Table::Components::Options::Labels

Included in:
Column, ColumnGroup
Defined in:
lib/phlexi/table/components/options/labels.rb

Instance Method Summary collapse

Instance Method Details

#label(label = nil) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/phlexi/table/components/options/labels.rb', line 8

def label(label = nil)
  if label.nil?
    options[:label] = options.fetch(:label) { calculate_label }
  else
    options[:label] = label
    self
  end
end