Class: RubyXL::Row

Inherits:
OOXMLObject show all
Defined in:
lib/rubyXL/objects/sheet_data.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from OOXMLObjectInstanceMethods

#==, #before_write_xml, included, #initialize, #write_xml

Instance Attribute Details

#worksheetObject

Returns the value of attribute worksheet.



123
124
125
# File 'lib/rubyXL/objects/sheet_data.rb', line 123

def worksheet
  @worksheet
end

Instance Method Details

#[](ind) ⇒ Object



129
130
131
# File 'lib/rubyXL/objects/sheet_data.rb', line 129

def [](ind)
  cells[ind]
end

#delete_cell_shift_left(col_index) ⇒ Object



142
143
144
145
# File 'lib/rubyXL/objects/sheet_data.rb', line 142

def delete_cell_shift_left(col_index)
  cells.delete_at(col_index)
  update_cell_coords(col_index)
end

#get_fill_colorObject



159
160
161
# File 'lib/rubyXL/objects/sheet_data.rb', line 159

def get_fill_color
  @worksheet.workbook.get_fill_color(xf)
end

#get_fontObject



163
164
165
# File 'lib/rubyXL/objects/sheet_data.rb', line 163

def get_font
  @worksheet.workbook.fonts[xf.font_id]
end

#index_in_collectionObject



125
126
127
# File 'lib/rubyXL/objects/sheet_data.rb', line 125

def index_in_collection
  r - 1
end

#insert_cell_shift_right(c, col_index) ⇒ Object



137
138
139
140
# File 'lib/rubyXL/objects/sheet_data.rb', line 137

def insert_cell_shift_right(c, col_index)
  cells.insert(col_index, c)
  update_cell_coords(col_index)
end

#sizeObject



133
134
135
# File 'lib/rubyXL/objects/sheet_data.rb', line 133

def size
  cells.size
end

#xfObject



155
156
157
# File 'lib/rubyXL/objects/sheet_data.rb', line 155

def xf
  @worksheet.workbook.cell_xfs[self.style_index || 0]
end