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.
112
113
114
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 112
def worksheet
@worksheet
end
|
Instance Method Details
#[](ind) ⇒ Object
118
119
120
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 118
def [](ind)
cells[ind]
end
|
#delete_cell_shift_left(col_index) ⇒ Object
135
136
137
138
139
140
141
142
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 135
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
148
149
150
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 148
def get_fill_color
@worksheet.workbook.get_fill_color(xf)
end
|
#get_font ⇒ Object
152
153
154
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 152
def get_font
@worksheet.workbook.fonts[xf.font_id]
end
|
#index_in_collection ⇒ Object
114
115
116
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 114
def index_in_collection
r - 1
end
|
#insert_cell_shift_right(c, col_index) ⇒ Object
126
127
128
129
130
131
132
133
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 126
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
122
123
124
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 122
def size
cells.size
end
|
#xf ⇒ Object
144
145
146
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 144
def xf
@worksheet.workbook.cell_xfs[self.style_index || 0]
end
|