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

#border_colors, #border_lines, #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_line, #border_bottom_line=, #border_bottom_width, #border_color=, #border_left_color, #border_left_color=, #border_left_line, #border_left_line=, #border_left_width, #border_left_width=, #border_line=, #border_right_color, #border_right_line, #border_right_line=, #border_right_width, #border_top_color, #border_top_color=, #border_top_line, #border_top_line=, #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_left, #padding_left=, #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

#background_colorObject



72
73
74
# File 'lib/prawn/table/cell/span_dummy.rb', line 72

def background_color
  @master_cell.background_color
end

#border_bottom_color=(val) ⇒ Object



60
61
62
# 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) ⇒ Object



68
69
70
# 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) ⇒ Object



56
57
58
# 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) ⇒ Object



64
65
66
# 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) ⇒ 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

#padding_bottom=(val) ⇒ Object



52
53
54
# 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) ⇒ Object



48
49
50
# File 'lib/prawn/table/cell/span_dummy.rb', line 48

def padding_right=(val)
  @master_cell.padding_right = val if rightmost?
end