lib/prawn/document.rb in prawn-1.0.0 vs lib/prawn/document.rb in prawn-1.1.0
- old
+ new
@@ -95,11 +95,11 @@
def self.extensions
@extensions ||= []
end
# @private
- def self.inherited(base)
+ def self.inherited(base)
extensions.each { |e| base.extensions << e }
end
# @group Stable Attributes
@@ -146,11 +146,11 @@
end
# Creates a new PDF Document. The following options are available (with
# the default values marked in [])
#
- # <tt>:page_size</tt>:: One of the Document::PageGeometry sizes [LETTER]
+ # <tt>:page_size</tt>:: One of the PDF::Core::PageGeometry sizes [LETTER]
# <tt>:page_layout</tt>:: Either <tt>:portrait</tt> or <tt>:landscape</tt>
# <tt>:margin</tt>:: Sets the margin on all sides in points [0.5 inch]
# <tt>:left_margin</tt>:: Sets the left margin in points [0.5 inch]
# <tt>:right_margin</tt>:: Sets the right margin in points [0.5 inch]
# <tt>:top_margin</tt>:: Sets the top margin in points [0.5 inch]
@@ -585,20 +585,20 @@
# Raises CannotGroup if the provided content is too large to fit alone in
# the current page or column.
#
# @private
def group(*a, &b)
- raise NotImplementedError,
+ raise NotImplementedError,
"Document#group has been disabled because its implementation "+
"lead to corrupted documents whenever a page boundary was "+
"crossed. We will try to work on reimplementing it in a "+
"future release"
end
# @private
def transaction
- raise NotImplementedError,
+ raise NotImplementedError,
"Document#transaction has been disabled because its implementation "+
"lead to corrupted documents whenever a page boundary was "+
"crossed. We will try to work on reimplementing it in a "+
"future release"
end
@@ -627,12 +627,12 @@
page_filter.call(page_number)
end
end
# @private
-
- def mask(*fields)
+
+ def mask(*fields)
# Stores the current state of the named attributes, executes the block, and
# then restores the original values after the block has executed.
# -- I will remove the nodoc if/when this feature is a little less hacky
stored = {}
fields.each { |f| stored[f] = send(f) }
@@ -694,10 +694,10 @@
@margin_box.add_right_padding(old_margin_box.total_right_padding)
end
# we must update bounding box if not flowing from the previous page
#
- @bounding_box = @margin_box unless @bounding_box && @bounding_box.parent
+ @bounding_box = @margin_box unless @bounding_box && @bounding_box.parent
end
def apply_margin_options(options)
if options[:margin]
# Treat :margin as CSS shorthand with 1-4 values.