Method: RubyXL::WorksheetConvenienceMethods#change_row_alignment

Defined in:
lib/rubyXL/convenience_methods/worksheet.rb

#change_row_alignment(row, &block) ⇒ Object


662
663
664
665
666
667
668
669
670
671
672
673
# File 'lib/rubyXL/convenience_methods/worksheet.rb', line 662

def change_row_alignment(row, &block)
  validate_workbook
  validate_nonnegative(row)
  ensure_cell_exists(row)

  sheet_data.rows[row].style_index = @workbook.modify_alignment(get_row_style(row), &block)

  sheet_data[row].cells.each { |c|
    next if c.nil?
    c.style_index = @workbook.modify_alignment(c.style_index, &block)
  }
end