Class: RubyXL::Row
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
#define_attribute, #define_child_node, #define_element_name, #obtain_class_variable, #parse, #set_countable
#before_write_xml, #dup, #initialize, #write_xml
Instance Attribute Details
#worksheet ⇒ Object
Returns the value of attribute worksheet.
106
107
108
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 106
def worksheet
@worksheet
end
|
Instance Method Details
#[](ind) ⇒ Object
112
113
114
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 112
def [](ind)
cells[ind]
end
|
#delete_cell_shift_left(col_index) ⇒ Object
129
130
131
132
133
134
135
136
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 129
def delete_cell_shift_left(col_index)
cells.delete_at(col_index)
col_index.upto(cells.size) { |col|
cell = cells[col]
next if cell.nil?
cell.column = col
}
end
|
#get_fill_color ⇒ Object
142
143
144
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 142
def get_fill_color
@worksheet.workbook.get_fill_color(xf)
end
|
#get_font ⇒ Object
146
147
148
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 146
def get_font
@worksheet.workbook.fonts[xf.font_id]
end
|
#index_in_collection ⇒ Object
108
109
110
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 108
def index_in_collection
r - 1
end
|
#insert_cell_shift_right(c, col_index) ⇒ Object
120
121
122
123
124
125
126
127
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 120
def insert_cell_shift_right(c, col_index)
cells.insert(col_index, c)
col_index.upto(cells.size) { |col|
cell = cells[col]
next if cell.nil?
cell.column = col
}
end
|
#size ⇒ Object
116
117
118
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 116
def size
cells.size
end
|
#xf ⇒ Object
138
139
140
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 138
def xf
@worksheet.workbook.cell_xfs[self.style_index || 0]
end
|