Class: Bookify::Node::Blockquote

Inherits:
Base
  • Object
show all
Defined in:
lib/bookify/node/blockquote.rb

Constant Summary

Constants inherited from Base

Bookify::Node::Base::FONTS

Instance Attribute Summary

Attributes inherited from Base

#node, #pdf

Instance Method Summary collapse

Methods inherited from Base

#clean_html, #font, #html_classes, #initialize, #method_missing, render

Constructor Details

This class inherits a constructor from Bookify::Node::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Bookify::Node::Base

Instance Method Details

#renderObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/bookify/node/blockquote.rb', line 3

def render
  font :primary

  data = node.css("p").map { |p| [" ", p.inner_html.strip] }

  table(data) do
    cells.inline_format = true
    cells.borders = []
    cells.padding = 5

    column(0).borders = [:left]
    column(0).border_width = 0.5
  end

  move_down 10
end