Sha256: cbc13244bfece8f581fd4ab66aa530bc8abcd2035bd15485e75bdc71d67e1834

Contents?: true

Size: 426 Bytes

Versions: 7

Compression:

Stored size: 426 Bytes

Contents

require_relative '../constants'

module Squib
  class Deck

    # DSL method. See http://squib.readthedocs.io
    def inches(n)
      @dpi * n.to_f
    end

    # DSL method. See http://squib.readthedocs.io
    def cm(n)
      @dpi * Squib::INCHES_IN_CM * n.to_f
    end

    # DSL method. See http://squib.readthedocs.io
    def mm(n)
      @dpi * Squib::INCHES_IN_CM * n.to_f / 10.0
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
squib-0.13.4 lib/squib/api/units.rb
squib-0.13.3 lib/squib/api/units.rb
squib-0.13.2 lib/squib/api/units.rb
squib-0.13.1 lib/squib/api/units.rb
squib-0.13.0 lib/squib/api/units.rb
squib-0.12.0 lib/squib/api/units.rb
squib-0.11.0 lib/squib/api/units.rb