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=, #relative_x, #relative_y, #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.



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

Instance Method Details

#avg_spanned_min_widthObject



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

def avg_spanned_min_width
  @master_cell.avg_spanned_min_width
end

#background_colorObject



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

def background_color
  @master_cell.background_color
end

#border_bottom_color=(val) ⇒ Object



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



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



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



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

Dummy cells have nothing to draw.



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

def draw_borders(pt)
end

#draw_bounded_content(pt) ⇒ Object

Dummy cells have nothing to draw.



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

def draw_bounded_content(pt)
end

#natural_content_heightObject

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



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

def natural_content_height
  0
end

#natural_content_widthObject

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



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

def natural_content_width
  0
end

#padding_bottom=(val) ⇒ Object



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



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

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