Sha256: 7f9ad93769d3157c71df92b85be9ef9acb12629810ddd418bbf0a966ed0e9d47

Contents?: true

Size: 745 Bytes

Versions: 8

Compression:

Stored size: 745 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_relative 'measurements'

# @group Stable API

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

  # @group Experimental API

  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

8 entries across 8 versions & 2 rubygems

Version Path
prawn-2.1.0 lib/prawn/measurement_extensions.rb
prawn-git-2.0.1 lib/prawn/measurement_extensions.rb
prawn-2.0.2 lib/prawn/measurement_extensions.rb
prawn-2.0.1 lib/prawn/measurement_extensions.rb
prawn-2.0.0 lib/prawn/measurement_extensions.rb
prawn-1.3.0 lib/prawn/measurement_extensions.rb
prawn-1.2.1 lib/prawn/measurement_extensions.rb
prawn-1.1.0 lib/prawn/measurement_extensions.rb