Class: Arrolio::Table::Grid::Placement

Inherits:
Struct
  • Object
show all
Defined in:
lib/arrolio/table/grid.rb

Overview

One cell's position in the grid. row_index is the row the cell STARTS in — a rowspan cell is placed and drawn only there, with a height covering every spanned row.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cellObject

Returns the value of attribute cell

Returns:

  • (Object)

    the current value of cell



18
19
20
# File 'lib/arrolio/table/grid.rb', line 18

def cell
  @cell
end

#colspanObject

Returns the value of attribute colspan

Returns:

  • (Object)

    the current value of colspan



18
19
20
# File 'lib/arrolio/table/grid.rb', line 18

def colspan
  @colspan
end

#column_indexObject

Returns the value of attribute column_index

Returns:

  • (Object)

    the current value of column_index



18
19
20
# File 'lib/arrolio/table/grid.rb', line 18

def column_index
  @column_index
end

#row_indexObject

Returns the value of attribute row_index

Returns:

  • (Object)

    the current value of row_index



18
19
20
# File 'lib/arrolio/table/grid.rb', line 18

def row_index
  @row_index
end

#rowspanObject

Returns the value of attribute rowspan

Returns:

  • (Object)

    the current value of rowspan



18
19
20
# File 'lib/arrolio/table/grid.rb', line 18

def rowspan
  @rowspan
end

Instance Method Details

#spans_multiple_columns?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/arrolio/table/grid.rb', line 24

def spans_multiple_columns?
  colspan > 1
end

#spans_multiple_rows?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/arrolio/table/grid.rb', line 20

def spans_multiple_rows?
  rowspan > 1
end