module Prawn
Welcome to Prawn, the best PDF Generation library ever. This documentation covers user level functionality.
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.
rubocop: disable Naming/MethodParameterName
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.
Constants
Attributes
When set to ‘true`, Prawn will verify hash options to ensure only valid keys are used. Off by default.
Example:
“‘shell >> Prawn::Document.new(:tomato => “Juicy”) Prawn::Errors::UnknownOption: Detected unknown option(s): [:tomato] Accepted options are: [:page_size, :page_layout, :left_margin, …] “`
@private @return [Boolean]
Public Class Methods
Source
# File lib/prawn/image_handler.rb, line 9 def self.image_handler @image_handler ||= ImageHandler.new end
Image handler.
@return [ImageHandler]
Public Instance Methods
Source
# File lib/prawn.rb, line 50 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}\nAccepted options are: #{accepted.inspect}" end yield if block_given? end
@private @param accepted [Array<Symbol>] list of valid options @param actual [Hash<Symbol, any>] opetions hash to validate @return [void] @raise [Prawn::Errors::UnknownOption] @yield