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.
94
95
96
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 94
def worksheet
@worksheet
end
|
Instance Method Details
#[](ind) ⇒ Object
100
101
102
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 100
def [](ind)
cells[ind]
end
|
#delete_cell_shift_left(col_index) ⇒ Object
117
118
119
120
121
122
123
124
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 117
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
130
131
132
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 130
def get_fill_color
@worksheet.workbook.get_fill_color(xf)
end
|
#get_font ⇒ Object
134
135
136
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 134
def get_font
@worksheet.workbook.fonts[xf.font_id]
end
|
#index_in_collection ⇒ Object
96
97
98
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 96
def index_in_collection
r - 1
end
|
#insert_cell_shift_right(c, col_index) ⇒ Object
108
109
110
111
112
113
114
115
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 108
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
104
105
106
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 104
def size
cells.size
end
|
#xf ⇒ Object
126
127
128
|
# File 'lib/rubyXL/objects/sheet_data.rb', line 126
def xf
@worksheet.workbook.cell_xfs[self.s || 0]
end
|