Class: RubyXL::Row

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

Overview

Constant Summary collapse

DEFAULT_HEIGHT =
13

Instance Attribute Summary collapse

Attributes included from OOXMLObjectInstanceMethods

#local_namespaces

Instance Method Summary collapse

Methods included from OOXMLObjectInstanceMethods

#==, included, #initialize, #write_xml

Instance Attribute Details

#worksheetObject

Returns the value of attribute worksheet.



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

def worksheet
  @worksheet
end

Instance Method Details

#[](ind) ⇒ Object



170
171
172
# File 'lib/rubyXL/objects/sheet_data.rb', line 170

def [](ind)
  cells[ind]
end

#before_write_xmlObject



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

def before_write_xml
  !(cells.nil? || cells.empty?)
end

#delete_cell_shift_left(col_index) ⇒ Object



183
184
185
186
# File 'lib/rubyXL/objects/sheet_data.rb', line 183

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

#get_fill_colorObject



200
201
202
# File 'lib/rubyXL/objects/sheet_data.rb', line 200

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

#get_fontObject



204
205
206
# File 'lib/rubyXL/objects/sheet_data.rb', line 204

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

#index_in_collectionObject



166
167
168
# File 'lib/rubyXL/objects/sheet_data.rb', line 166

def index_in_collection
  r - 1
end

#insert_cell_shift_right(c, col_index) ⇒ Object



178
179
180
181
# File 'lib/rubyXL/objects/sheet_data.rb', line 178

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

#sizeObject



174
175
176
# File 'lib/rubyXL/objects/sheet_data.rb', line 174

def size
  cells.size
end

#xfObject



196
197
198
# File 'lib/rubyXL/objects/sheet_data.rb', line 196

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