Module: PDFGen::CaptionContainer

Included in:
Div, Document, Span
Defined in:
lib/containers/caption_container.rb

Instance Method Summary collapse

Instance Method Details

#caption(text = nil, style = nil) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/containers/caption_container.rb', line 5

def caption(text = nil, style = nil)
  caption = Caption.new self
  caption.text = text if text
  caption.width = self.av_width
  caption.set_properties style unless style.nil?
  self.add_region(caption)
end