Class: ThousandIsland::Components::Body

Inherits:
Base
  • Object
show all
Defined in:
lib/thousand_island/components/body.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #pdf

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#after_render, #defaults, #draw, #initialize, #render_all, #repeated?

Constructor Details

This class inherits a constructor from ThousandIsland::Components::Base

Class Method Details

.defaultsObject



12
13
14
15
# File 'lib/thousand_island/components/body.rb', line 12

def self.defaults
  {
  }
end

Instance Method Details

#renderObject



5
6
7
8
9
10
# File 'lib/thousand_island/components/body.rb', line 5

def render
  start_coords = [0, options[:top]]
  pdf.bounding_box(start_coords, height: options[:height], width: pdf.bounds.width) do
    yield if block_given?
  end
end