Class: Rspreadsheet::MemberOfRowGroup
- Inherits:
-
LazyDetachableRow
- Object
- Row
- LazyDetachableRow
- Rspreadsheet::MemberOfRowGroup
- Extended by:
- Forwardable
- Defined in:
- lib/rspreadsheet/row.rb
Overview
there are not data in this object, they are taken from RowGroup, but this is only readonly
Instance Attribute Summary collapse
-
#row_group ⇒ Object
for dubugging.
Instance Method Summary collapse
- #cells(coli) ⇒ Object
-
#detach ⇒ Object
detaches MemberOfRowGroup from its RowGroup perhaps splitting RowGroup.
-
#initialize(arowi, arow_group) ⇒ MemberOfRowGroup
constructor
A new instance of MemberOfRowGroup.
- #nonemptycells ⇒ Object
Methods inherited from LazyDetachableRow
Methods inherited from Row
Constructor Details
#initialize(arowi, arow_group) ⇒ MemberOfRowGroup
Returns a new instance of MemberOfRowGroup.
252 253 254 255 256 |
# File 'lib/rspreadsheet/row.rb', line 252 def initialize(arowi,arow_group) super(arowi) @row_group = arow_group raise 'Wrong parameter given' unless @row_group.is_a? RowGroup end |
Instance Attribute Details
#row_group ⇒ Object
for dubugging
248 249 250 |
# File 'lib/rspreadsheet/row.rb', line 248 def row_group @row_group end |
Instance Method Details
#cells(coli) ⇒ Object
260 261 262 |
# File 'lib/rspreadsheet/row.rb', line 260 def cells(coli) Cell.new(self,coli,@row_group.cellnodes(coli)).tap{|n| n.mode = :repeated} end |
#detach ⇒ Object
detaches MemberOfRowGroup from its RowGroup perhaps splitting RowGroup
257 258 259 |
# File 'lib/rspreadsheet/row.rb', line 257 def detach # detaches MemberOfRowGroup from its RowGroup perhaps splitting RowGroup @row_group.parent_array.detach(@index) end |
#nonemptycells ⇒ Object
263 264 265 |
# File 'lib/rspreadsheet/row.rb', line 263 def nonemptycells @row_group.nonemptycellsindexes.collect{ |coli| cells(coli) } end |