Class: Rspreadsheet::SingleRow

Inherits:
RowWithXMLNode show all
Defined in:
lib/rspreadsheet/row.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RowWithXMLNode

#add_cell, #cellnodes, #cells, #first_unused_column_index, #nonemptycells, #nonemptycellsindexes, #style_name=, #used_col_range, #used_range

Methods inherited from Row

empty_row_node

Constructor Details

#initialize(aparent_array, aindex, axmlnode = nil) ⇒ SingleRow

index Integer



210
211
212
213
214
215
216
217
# File 'lib/rspreadsheet/row.rb', line 210

def initialize(aparent_array,aindex,axmlnode=nil)
  @parent_array = aparent_array
  @index = aindex
  if axmlnode.nil?
    axmlnode = Row.empty_row_node
  end
  @xmlnode = axmlnode
end

Instance Attribute Details

#xmlnodeObject

Returns the value of attribute xmlnode.



208
209
210
# File 'lib/rspreadsheet/row.rb', line 208

def xmlnode
  @xmlnode
end

Class Method Details

.new_from_rowgroup(rg) ⇒ Object



218
219
220
221
222
223
# File 'lib/rspreadsheet/row.rb', line 218

def self.new_from_rowgroup(rg)
  anode = rg.xmlnode
  Tools.remove_ns_attribute(anode,'table','number-rows-repeated')
  
  SingleRow.new(rg.parent_array,rg.range.begin,anode)
end

Instance Method Details

#detachObject



228
# File 'lib/rspreadsheet/row.rb', line 228

def detach; true end

#normalizeObject



224
# File 'lib/rspreadsheet/row.rb', line 224

def normalize; self end

#rangeObject



227
# File 'lib/rspreadsheet/row.rb', line 227

def range; (@index..@index) end

#repeatedObject



226
# File 'lib/rspreadsheet/row.rb', line 226

def repeated; 1 end

#repeated?Boolean

Returns:

  • (Boolean)


225
# File 'lib/rspreadsheet/row.rb', line 225

def repeated?; false end

#rowObject



229
# File 'lib/rspreadsheet/row.rb', line 229

def row; @index end