Module: Prawn
- Extended by:
- Prawn
- Included in:
- Prawn
- Defined in:
- lib/prawn/stamp.rb,
lib/prawn.rb,
lib/prawn/font.rb,
lib/prawn/text.rb,
lib/prawn/table.rb,
lib/prawn/errors.rb,
lib/prawn/images.rb,
lib/prawn/layout.rb,
lib/prawn/outline.rb,
lib/prawn/document.rb,
lib/prawn/encoding.rb,
lib/prawn/font/afm.rb,
lib/prawn/font/ttf.rb,
lib/prawn/graphics.rb,
lib/prawn/repeater.rb,
lib/prawn/security.rb,
lib/prawn/text/box.rb,
lib/prawn/soft_mask.rb,
lib/prawn/templates.rb,
lib/prawn/utilities.rb,
lib/prawn/font/dfont.rb,
lib/prawn/images/jpg.rb,
lib/prawn/images/png.rb,
lib/prawn/table/cell.rb,
lib/prawn/layout/grid.rb,
lib/prawn/table/cells.rb,
lib/prawn/images/image.rb,
lib/prawn/measurements.rb,
lib/prawn/document/span.rb,
lib/prawn/graphics/dash.rb,
lib/prawn/image_handler.rb,
lib/prawn/graphics/color.rb,
lib/prawn/table/cell/text.rb,
lib/prawn/table/cell/image.rb,
lib/prawn/document/snapshot.rb,
lib/prawn/font_metric_cache.rb,
lib/prawn/graphics/patterns.rb,
lib/prawn/document/internals.rb,
lib/prawn/graphics/cap_style.rb,
lib/prawn/text/formatted/box.rb,
lib/prawn/document/column_box.rb,
lib/prawn/graphics/join_style.rb,
lib/prawn/table/cell/in_table.rb,
lib/prawn/table/cell/subtable.rb,
lib/prawn/text/formatted/wrap.rb,
lib/prawn/document/bounding_box.rb,
lib/prawn/graphics/transparency.rb,
lib/prawn/table/cell/span_dummy.rb,
lib/prawn/text/formatted/parser.rb,
lib/prawn/document/graphics_state.rb,
lib/prawn/graphics/transformation.rb,
lib/prawn/text/formatted/arranger.rb,
lib/prawn/text/formatted/fragment.rb,
lib/prawn/text/formatted/line_wrap.rb,
lib/prawn/table/column_width_calculator.rb
Overview
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.
Defined Under Namespace
Modules: Configurable, Encoding, Errors, Graphics, Images, Layout, Measurements, SoftMask, Stamp, Templates, Text Classes: Document, Font, FontMetricCache, ImageHandler, Repeater, SynchronizedCache, Table, ThreadLocalCache
Constant Summary collapse
- VERSION =
"0.14.0"
- BASEDIR =
The base source directory for Prawn as installed on the system
File.(File.join(dir, '..'))
- DATADIR =
File.(File.join(dir, '..', 'data'))
Instance Attribute Summary collapse
-
#debug ⇒ Object
Whe set to true, Prawn will verify hash options to ensure only valid keys are used.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#debug ⇒ Object
Whe 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, ...]
46 47 48 |
# File 'lib/prawn.rb', line 46 def debug @debug end |
Class Method Details
.image_handler ⇒ Object
2 3 4 |
# File 'lib/prawn/image_handler.rb', line 2 def self.image_handler @image_handler ||= ImageHandler.new end |
Instance Method Details
#verify_options(accepted, actual) ⇒ Object
:nodoc:
48 49 50 51 52 53 54 55 56 |
# File 'lib/prawn.rb', line 48 def (accepted, actual) #:nodoc: 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 |