Sha256: 25da25198685dc6d052f53e5ec343b8098fcd70e084199c473a784ee3c20b810

Contents?: true

Size: 711 Bytes

Versions: 33

Compression:

Stored size: 711 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 self
  end
end        

Version data entries

33 entries across 33 versions & 10 rubygems

Version Path
kavu-prawn-core-0.4.100 lib/prawn/measurement_extensions.rb
kavu-prawn-core-0.4.99 lib/prawn/measurement_extensions.rb
prawn-1.0.0.rc2 lib/prawn/measurement_extensions.rb
nurettin-prawn-1.0.0.rc1 lib/prawn/measurement_extensions.rb
prawn-1.0.0.rc1 lib/prawn/measurement_extensions.rb
prawn-0.12.0 lib/prawn/measurement_extensions.rb
prawn-0.11.1 lib/prawn/measurement_extensions.rb
davebenvenuti-prawn-0.11.1.pre lib/prawn/measurement_extensions.rb
piglop-prawn-0.10.2.3 lib/prawn/measurement_extensions.rb
piglop-prawn-0.10.2.2 lib/prawn/measurement_extensions.rb
piglop-prawn-0.10.2.1 lib/prawn/measurement_extensions.rb
prawn-0.11.1.pre lib/prawn/measurement_extensions.rb
goodwill-prawn-edge-0.10.0 lib/prawn/measurement_extensions.rb
alphasights-prawn-0.10.4 lib/prawn/measurement_extensions.rb
alphasights-prawn-0.10.3 lib/prawn/measurement_extensions.rb
alphasights-prawn-0.10.2 lib/prawn/measurement_extensions.rb
alphasights-prawn-0.10.1 lib/prawn/measurement_extensions.rb
alphasights-prawn-0.10.0 lib/prawn/measurement_extensions.rb
prawn-core-0.8.4 lib/prawn/measurement_extensions.rb
prawn-graph-0.0.2 vendor/prawn-core/lib/prawn/measurement_extensions.rb