module TypographicUnit

TypographicUnit is a namespece for unit classes.

Constants

TABLE

@api private

VERSION

Version number of typographic-unit.

Public Class Methods

init() click to toggle source

Initialize typographic-unit. This makes unit methods for Numeric.

# File lib/typographic-unit.rb, line 7
def self.init
  TABLE.values.each do |unit|
    ::Numeric.instance_eval do
      define_method(unit.short) do
        unit.new(self)
      end
    end
  end
end