Sha256: d79f06b869a8b5bc4c9c478f8165698d4c428ca253ec93ba993979d33c1a2071
Contents?: true
Size: 486 Bytes
Versions: 6
Compression:
Stored size: 486 Bytes
Contents
require 'squib/constants' module Squib module Args # :nodoc: # @api private module UnitConversion # :nodoc: # @api private module_function def parse(arg, dpi=300) case arg.to_s.rstrip when /in$/ #ends with "in" arg.rstrip[0..-2].to_f * dpi when /cm$/ #ends with "cm" arg.rstrip[0..-2].to_f * dpi * INCHES_IN_CM else arg end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems