Class: Prawn::Table::Cell::SpanDummy

Inherits:
Prawn::Table::Cell show all
Defined in:
lib/prawn/table/cell/span_dummy.rb

Overview

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

Constant Summary

Constants inherited from Prawn::Table::Cell

FPTolerance

Instance Attribute Summary

Attributes inherited from Prawn::Table::Cell

#background_color, #border_colors, #border_widths, #borders, #colspan, #content, #dummy_cells, #height, #padding, #rowspan

Instance Method Summary collapse

Methods inherited from Prawn::Table::Cell

#border_bottom_color, #border_bottom_color=, #border_bottom_width, #border_bottom_width=, #border_color=, #border_left_color, #border_left_color=, #border_left_width, #border_left_width=, #border_right_color, #border_right_color=, #border_right_width, #border_right_width=, #border_top_color, #border_top_color=, #border_top_width, #border_top_width=, #border_width=, #content_height, #content_width, #draw, #draw_background, draw_cells, #draw_content, #height_ignoring_span, make, #max_width, #max_width_ignoring_span, #min_width, #min_width_ignoring_span, #padding_bottom, #padding_bottom=, #padding_left, #padding_left=, #padding_right, #padding_right=, #padding_top, #padding_top=, #set_width_constraints, #spanned_content_height, #spanned_content_width, #style, #width, #width=, #width_ignoring_span, #x, #x=, #y, #y=

Constructor Details

#initialize(pdf, master_cell) ⇒ SpanDummy

Returns a new instance of SpanDummy.



16
17
18
19
20
# 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

Instance Method Details

#avg_spanned_min_widthObject



34
35
36
# File 'lib/prawn/table/cell/span_dummy.rb', line 34

def avg_spanned_min_width
  @master_cell.avg_spanned_min_width
end

#draw_borders(pt) ⇒ Object

Dummy cells have nothing to draw.



40
41
# File 'lib/prawn/table/cell/span_dummy.rb', line 40

def draw_borders(pt)
end

#draw_bounded_content(pt) ⇒ Object

Dummy cells have nothing to draw.



45
46
# File 'lib/prawn/table/cell/span_dummy.rb', line 45

def draw_bounded_content(pt)
end

#natural_content_heightObject

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



24
25
26
# File 'lib/prawn/table/cell/span_dummy.rb', line 24

def natural_content_height
  0
end

#natural_content_widthObject

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



30
31
32
# File 'lib/prawn/table/cell/span_dummy.rb', line 30

def natural_content_width
  0
end