Sha256: d7db4dc445d44bca11cbff61912094a966d1c794e72384e065d77934dbd32535

Contents?: true

Size: 692 Bytes

Versions: 2

Compression:

Stored size: 692 Bytes

Contents

# encoding: utf-8
# measurement_extensions.rb: Core extensions for Prawn::Measurements
#
# Copyright December 2008, Florian Witteler.  All Rights Reserved.
#
# This is free software. Please see the LICENSE and COPYING files for details.

require 'prawn/measurements'

class Numeric
  include Prawn::Measurements
  # prawns' basic unit is PostScript-Point
  # 72 points per inch

  def mm
    return mm2pt(self)
  end

  def cm
    return cm2pt(self)
  end

  def dm
    return dm2pt(self)
  end

  def m
    return m2pt(self)
  end

  def in
    return in2pt(self)
  end

  def yd
    return yd2pt(self)
  end

  def ft
    return ft2pt(self)
  end

  def pt
    return pt2pt(self)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prawn-0.13.1 lib/prawn/measurement_extensions.rb
prawn-0.13.0 lib/prawn/measurement_extensions.rb