Sha256: 1780d2bf6f2e8617f0c8d0bd2dd610369f18794dc237f706b24ffd6df5e273d2

Contents?: true

Size: 702 Bytes

Versions: 2

Compression:

Stored size: 702 Bytes

Contents

# frozen_string_literal: true

# 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
    mm2pt(self)
  end

  def cm
    cm2pt(self)
  end

  def dm
    dm2pt(self)
  end

  def m
    m2pt(self)
  end

  def in
    in2pt(self)
  end

  def yd
    yd2pt(self)
  end

  def ft
    ft2pt(self)
  end

  def pt
    pt2pt(self)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prawn-2.4.0 lib/prawn/measurement_extensions.rb
prawn-2.3.0 lib/prawn/measurement_extensions.rb