Sha256: 6ce16b86438302dd432a043f08cfe4d99c9dd0b767b5e63ae89441d542805e35

Contents?: true

Size: 280 Bytes

Versions: 83

Compression:

Stored size: 280 Bytes

Contents

# encoding: utf-8

# Numeric
class Numeric
  # get dozen number
  #
  # ==== Examples
  #
  # 0,1,2 case
  #
  #   0.dozen # => return 0
  #   1.dozen # => return 12
  #   2.dozen # => return 24
  #
  def dozen
    return 0 if self == 0
    self * 12
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.151 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.150 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.149 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.148 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.147 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.146 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.145 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.144 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.143 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.142 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.141 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.140 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.139 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.138 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.137 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.136 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.135 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.134 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.133 lib/open_classes/numeric/dozen.rb
tbpgr_utils-0.0.132 lib/open_classes/numeric/dozen.rb