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, #init_child_nodes, #initialize, #write_xml

Instance Attribute Details

#worksheet ⇒ Object

Returns the value of attribute worksheet.



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

def worksheet
  @worksheet
end

Instance Method Details

#[](ind) ⇒ Object



181
182
183
# File 'lib/rubyXL/objects/sheet_data.rb', line 181

def [](ind)
  cells[ind]
end

#before_write_xml ⇒ Object



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

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

#delete_cell_shift_left(col_index) ⇒ Object



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

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

#get_fill_color ⇒ Object



211
212
213
# File 'lib/rubyXL/objects/sheet_data.rb', line 211

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

#get_font ⇒ Object



215
216
217
# File 'lib/rubyXL/objects/sheet_data.rb', line 215

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

#index_in_collection ⇒ Object



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

def index_in_collection
  r - 1
end

#insert_cell_shift_right(c, col_index) ⇒ Object



189
190
191
192
# File 'lib/rubyXL/objects/sheet_data.rb', line 189

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

#size ⇒ Object



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

def size
  cells.size
end

#xf ⇒ Object



207
208
209
# File 'lib/rubyXL/objects/sheet_data.rb', line 207

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