Module: Phlexi::Field::Options::Labels

Included in:
Builder
Defined in:
lib/phlexi/field/options/labels.rb

Instance Method Summary collapse

Instance Method Details

#label(label = nil) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/phlexi/field/options/labels.rb', line 7

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