From 0d52abfd0ea42ba8f9bac996378087be42b93917 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 26 Oct 2005 13:10:03 +0000 Subject: Added petabytes and exebytes to numeric extensions (closes #2397) [timct@mac.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/numeric/bytes.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'activesupport/lib/active_support/core_ext/numeric') diff --git a/activesupport/lib/active_support/core_ext/numeric/bytes.rb b/activesupport/lib/active_support/core_ext/numeric/bytes.rb index 98e5e13abb..56477673a3 100644 --- a/activesupport/lib/active_support/core_ext/numeric/bytes.rb +++ b/activesupport/lib/active_support/core_ext/numeric/bytes.rb @@ -27,6 +27,17 @@ module ActiveSupport #:nodoc: self * 1024.gigabytes end alias :terabyte :terabytes + + def petabytes + self * 1024.terabytes + end + alias :petabyte :petabytes + + def exabytes + self * 1024.petabytes + end + alias :exabyte :exabytes + end end end -- cgit v1.2.3