class Prawn::Table::Cell::SpanDummy

A Cell object used to represent all but the topmost cell in a span group.

@private

Public Class Methods

new(pdf, master_cell) click to toggle source
Calls superclass method Prawn::Table::Cell::new
# File lib/prawn/table/cell/span_dummy.rb, line 17
def initialize(pdf, master_cell)
  super(pdf, [0, pdf.cursor])
  @master_cell = master_cell
  @padding = [0, 0, 0, 0]
end

Public Instance Methods

avg_spanned_min_width() click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 35
def avg_spanned_min_width
  @master_cell.avg_spanned_min_width
end
background_color() click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 73
def background_color
  @master_cell.background_color
end
border_bottom_color=(val) click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 61
def border_bottom_color=(val)
  @master_cell.border_bottom_color = val if bottommost?
end
border_bottom_width=(val) click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 69
def border_bottom_width=(val)
  @master_cell.border_bottom_width = val if bottommost?
end
border_right_color=(val) click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 57
def border_right_color=(val)
  @master_cell.border_right_color = val if rightmost?
end
border_right_width=(val) click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 65
def border_right_width=(val)
  @master_cell.border_right_width = val if rightmost?
end
draw_borders(pt) click to toggle source

Dummy cells have nothing to draw.

# File lib/prawn/table/cell/span_dummy.rb, line 41
def draw_borders(pt)
end
draw_bounded_content(pt) click to toggle source

Dummy cells have nothing to draw.

# File lib/prawn/table/cell/span_dummy.rb, line 46
def draw_bounded_content(pt)
end
natural_content_height() click to toggle source

By default, a span dummy will never increase the height demand.

# File lib/prawn/table/cell/span_dummy.rb, line 25
def natural_content_height
  0
end
natural_content_width() click to toggle source

By default, a span dummy will never increase the width demand.

# File lib/prawn/table/cell/span_dummy.rb, line 31
def natural_content_width
  0
end
padding_bottom=(val) click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 53
def padding_bottom=(val)
  @master_cell.padding_bottom = val if bottommost?
end
padding_right=(val) click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 49
def padding_right=(val)
  @master_cell.padding_right = val if rightmost?
end

Private Instance Methods

bottommost?() click to toggle source

Are we on the bottom border of the span?

# File lib/prawn/table/cell/span_dummy.rb, line 87
def bottommost?
  @row == @master_cell.row + @master_cell.rowspan - 1
end
rightmost?() click to toggle source

Are we on the right border of the span?

# File lib/prawn/table/cell/span_dummy.rb, line 81
def rightmost?
  @column == @master_cell.column + @master_cell.colspan - 1
end