Class: Pdfcrate::GridProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/pdfcrate.rb

Overview

Extend GridProxy with bounding_box method that delegates to Document

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_documentObject

Returns the value of attribute _document.



32
33
34
# File 'lib/pdfcrate.rb', line 32

def _document
  @_document
end

Instance Method Details

#bounding_box(&block) ⇒ Object



34
35
36
37
38
39
40
41
42
# File 'lib/pdfcrate.rb', line 34

def bounding_box(&block)
  raise "GridProxy must be associated with a Document" unless _document

  if is_span
    _document.grid_span_bounding_box(row, col, end_row, end_col, &block)
  else
    _document.grid_cell_bounding_box(row, col, &block)
  end
end