module Prawn

bounding_box.rb : Implements a mechanism for shifting the coordinate space

Copyright May 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

span.rb : Implements text columns

Copyright September 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

Copyright September 2008, Gregory Brown, James Healy All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

errors.rb : Implements custom error classes for Prawn

Copyright April 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

font_metric_cache.rb : The Prawn font class

Copyright Dec 2012, Kenneth Kalmer. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

blend_mode.rb : Implements blend modes

Contributed by John Ford. October, 2015

This is free software. Please see the LICENSE and COPYING files for details.

cap_style.rb : Implements stroke cap styling

Contributed by Daniel Nelson. October, 2009

This is free software. Please see the LICENSE and COPYING files for details.

color.rb : Implements color handling

Copyright June 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

dash.rb : Implements stroke dashing

Contributed by Daniel Nelson. October, 2009

This is free software. Please see the LICENSE and COPYING files for details.

join_style.rb : Implements stroke join styling

Contributed by Daniel Nelson. October, 2009

This is free software. Please see the LICENSE and COPYING files for details.

patterns.rb : Implements axial & radial gradients

Originally implemented by Wojciech Piekutowski. November, 2009 Copyright September 2012, Alexander Mankuta. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

transformation.rb: Implements rotate, translate, skew, scale and a generic

transformation_matrix

Copyright January 2010, Michael Witrant. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

transparency.rb : Implements transparency

Copyright October 2009, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

grid.rb: Provides a basic grid layout system for Prawn

Contributed by Andrew O’Brien in March 2009

This is free software. Please see the LICENSE and COPYING files for details.

ImageHandler provides a way to register image processors with Prawn

Contributed by Evan Sharp in November 2013.

This is free software. Please see the LICENSE and COPYING files for details.

rubocop: disable Naming/MethodParameterName

repeater.rb : Implements repeated page elements. Heavy inspired by repeating_element() in PDF::Wrapper

http://pdf-wrapper.rubyforge.org/

Copyright November 2009, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

soft_mask.rb : Implements soft-masking

Copyright September 2012, Alexander Mankuta. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

stamp.rb : Implements a repeatable stamp

Copyright October 2009, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

core/text/formatted/arranger.rb : Implements a data structure for 2-stage

processing of lines of formatted text

Copyright February 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

text/formatted/rectangle.rb : Implements text boxes with formatted text

Copyright February 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

text/formatted/fragment.rb : Implements information about a formatted fragment

Copyright March 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

core/text/formatted/line_wrap.rb : Implements individual line wrapping of

formatted text

Copyright February 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

text/formatted/parser.rb : Implements a bi-directional parser between a subset

of html and formatted text arrays

Copyright February 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

rubocop: disable Metrics/ParameterLists, Naming/MethodParameterName

utilities.rb : General-purpose utility classes which don’t fit anywhere else

Copyright August 2012, Alex Dowad. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

prawn/view.rb : Implements a mixin for Prawn’s DSL

This is free software. Please see the LICENSE and COPYING files for details.

Constants

BASEDIR

The base source directory for Prawn as installed on the system

DATADIR
FLOAT_PRECISION
VERSION

Attributes

debug[RW]

When set to true, Prawn will verify hash options to ensure only valid keys are used. Off by default.

Example:

>> Prawn::Document.new(:tomato => "Juicy")
Prawn::Errors::UnknownOption:
Detected unknown option(s): [:tomato]
Accepted options are: [:page_size, :page_layout, :left_margin, ...]

@private

debug[RW]

When set to true, Prawn will verify hash options to ensure only valid keys are used. Off by default.

Example:

>> Prawn::Document.new(:tomato => "Juicy")
Prawn::Errors::UnknownOption:
Detected unknown option(s): [:tomato]
Accepted options are: [:page_size, :page_layout, :left_margin, ...]

@private

Public Class Methods

image_handler() click to toggle source

@group Extension API

# File lib/prawn/image_handler.rb, line 12
def self.image_handler
  @image_handler ||= ImageHandler.new
end

Public Instance Methods

verify_options(accepted, actual) { || ... } click to toggle source

@private

# File lib/prawn.rb, line 41
def verify_options(accepted, actual)
  return unless debug || $DEBUG

  unless (act = Set[*actual.keys]).subset?(acc = Set[*accepted])
    raise Prawn::Errors::UnknownOption,
      "\nDetected unknown option(s): #{(act - acc).to_a.inspect}\n" \
      "Accepted options are: #{accepted.inspect}"
  end
  yield if block_given?
end