Module: Phlexi::Table::Components::Options::Alignment

Included in:
Column
Defined in:
lib/phlexi/table/components/options/alignment.rb

Instance Method Summary collapse

Instance Method Details

#alignment(alignment = nil) ⇒ Object



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

def alignment(alignment = nil)
  if alignment.nil?
    options[:align] = options.fetch(:align) { calculate_alignment }
  else
    options[:align] = alignment
    self
  end
end