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 16
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 34
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 72
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 60
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 68
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 56
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 64
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 40
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 45
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 24
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 30
def natural_content_width
  0
end
padding_bottom=(val) click to toggle source
# File lib/prawn/table/cell/span_dummy.rb, line 52
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 48
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 86
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 80
def rightmost?
  @column == @master_cell.column + @master_cell.colspan - 1
end