Module: RubyXL::CellConvenienceMethods

Included in:
Cell
Defined in:
lib/rubyXL/convenience_methods.rb

Instance Method Summary collapse

Instance Method Details

#change_border(direction, weight) ⇒ Object


645
646
647
648
# File 'lib/rubyXL/convenience_methods.rb', line 645

def change_border(direction, weight)
  validate_worksheet
  self.style_index = workbook.modify_border(self.style_index, direction, weight)
end

#change_horizontal_alignment(alignment = 'center') ⇒ Object


630
631
632
633
# File 'lib/rubyXL/convenience_methods.rb', line 630

def change_horizontal_alignment(alignment = 'center')
  validate_worksheet
  self.style_index = workbook.modify_alignment(self.style_index) { |a| a.horizontal = alignment }
end

#change_text_wrap(wrap = false) ⇒ Object


640
641
642
643
# File 'lib/rubyXL/convenience_methods.rb', line 640

def change_text_wrap(wrap = false)
  validate_worksheet
  self.style_index = workbook.modify_alignment(self.style_index) { |a| a.wrap_text = wrap }
end

#change_vertical_alignment(alignment = 'center') ⇒ Object


635
636
637
638
# File 'lib/rubyXL/convenience_methods.rb', line 635

def change_vertical_alignment(alignment = 'center')
  validate_worksheet
  self.style_index = workbook.modify_alignment(self.style_index) { |a| a.vertical = alignment }
end

#get_border(direction) ⇒ Object


625
626
627
628
# File 'lib/rubyXL/convenience_methods.rb', line 625

def get_border(direction)
  validate_worksheet
  get_cell_border.get_edge_style(direction)
end