aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/number_helper.rb18
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_currency_converter.rb (renamed from activesupport/lib/active_support/number_helper/number_to_currency.rb)3
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb (renamed from activesupport/lib/active_support/number_helper/number_to_delimited.rb)2
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_human_converter.rb (renamed from activesupport/lib/active_support/number_helper/number_to_human.rb)3
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb (renamed from activesupport/lib/active_support/number_helper/number_to_human_size.rb)3
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb (renamed from activesupport/lib/active_support/number_helper/number_to_percentage.rb)3
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_phone_converter.rb (renamed from activesupport/lib/active_support/number_helper/number_to_phone.rb)3
-rw-r--r--activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb (renamed from activesupport/lib/active_support/number_helper/number_to_rounded.rb)2
8 files changed, 11 insertions, 26 deletions
diff --git a/activesupport/lib/active_support/number_helper.rb b/activesupport/lib/active_support/number_helper.rb
index 53f08efae5..2df1aada50 100644
--- a/activesupport/lib/active_support/number_helper.rb
+++ b/activesupport/lib/active_support/number_helper.rb
@@ -1,14 +1,18 @@
module ActiveSupport
module NumberHelper
+ extend ActiveSupport::Autoload
- autoload :NumberToRoundedConverter, "active_support/number_helper/number_to_rounded"
- autoload :NumberToDelimitedConverter, "active_support/number_helper/number_to_delimited"
- autoload :NumberToHumanConverter, "active_support/number_helper/number_to_human"
- autoload :NumberToHumanSizeConverter, "active_support/number_helper/number_to_human_size"
- autoload :NumberToPhoneConverter, "active_support/number_helper/number_to_phone"
- autoload :NumberToCurrencyConverter, "active_support/number_helper/number_to_currency"
- autoload :NumberToPercentageConverter, "active_support/number_helper/number_to_percentage"
+ eager_autoload do
+ autoload :NumberConverter
+ autoload :NumberToRoundedConverter
+ autoload :NumberToDelimitedConverter
+ autoload :NumberToHumanConverter
+ autoload :NumberToHumanSizeConverter
+ autoload :NumberToPhoneConverter
+ autoload :NumberToCurrencyConverter
+ autoload :NumberToPercentageConverter
+ end
extend self
diff --git a/activesupport/lib/active_support/number_helper/number_to_currency.rb b/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb
index 402b0b56aa..113e557415 100644
--- a/activesupport/lib/active_support/number_helper/number_to_currency.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb
@@ -1,6 +1,3 @@
-require 'active_support/number_helper/number_converter'
-require 'active_support/number_helper/number_to_rounded'
-
module ActiveSupport
module NumberHelper
class NumberToCurrencyConverter < NumberConverter # :nodoc:
diff --git a/activesupport/lib/active_support/number_helper/number_to_delimited.rb b/activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb
index b543b0c19d..6604b9cce4 100644
--- a/activesupport/lib/active_support/number_helper/number_to_delimited.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb
@@ -1,5 +1,3 @@
-require 'active_support/number_helper/number_converter'
-
module ActiveSupport
module NumberHelper
class NumberToDelimitedConverter < NumberConverter #:nodoc:
diff --git a/activesupport/lib/active_support/number_helper/number_to_human.rb b/activesupport/lib/active_support/number_helper/number_to_human_converter.rb
index 70d669f175..3cdf6ff9f8 100644
--- a/activesupport/lib/active_support/number_helper/number_to_human.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_human_converter.rb
@@ -1,6 +1,3 @@
-require 'active_support/number_helper/number_converter'
-require 'active_support/number_helper/number_to_rounded'
-
module ActiveSupport
module NumberHelper
class NumberToHumanConverter < NumberConverter # :nodoc:
diff --git a/activesupport/lib/active_support/number_helper/number_to_human_size.rb b/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb
index c0930564bc..6a0f6e70b7 100644
--- a/activesupport/lib/active_support/number_helper/number_to_human_size.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb
@@ -1,6 +1,3 @@
-require 'active_support/number_helper/number_converter'
-require 'active_support/number_helper/number_to_rounded'
-
module ActiveSupport
module NumberHelper
class NumberToHumanSizeConverter < NumberConverter
diff --git a/activesupport/lib/active_support/number_helper/number_to_percentage.rb b/activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb
index 25e136be60..b7926cf151 100644
--- a/activesupport/lib/active_support/number_helper/number_to_percentage.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb
@@ -1,6 +1,3 @@
-require 'active_support/number_helper/number_converter'
-require 'active_support/number_helper/number_to_rounded'
-
module ActiveSupport
module NumberHelper
class NumberToPercentageConverter < NumberConverter # :nodoc:
diff --git a/activesupport/lib/active_support/number_helper/number_to_phone.rb b/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb
index 171c2dff18..c4aa5c311a 100644
--- a/activesupport/lib/active_support/number_helper/number_to_phone.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb
@@ -1,6 +1,3 @@
-require 'active_support/number_helper/number_converter'
-require 'active_support/number_helper/number_to_rounded'
-
module ActiveSupport
module NumberHelper
class NumberToPhoneConverter < NumberConverter
diff --git a/activesupport/lib/active_support/number_helper/number_to_rounded.rb b/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb
index 817ac1ebb2..355c810dc9 100644
--- a/activesupport/lib/active_support/number_helper/number_to_rounded.rb
+++ b/activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb
@@ -1,5 +1,3 @@
-require 'active_support/number_helper/number_converter'
-
module ActiveSupport
module NumberHelper
class NumberToRoundedConverter < NumberConverter # :nodoc: