Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changing to use autoload for better performance

  • Loading branch information...
commit c716b76df318d70ab96e590c71483fe52f1fbc8b 1 parent 172ba37
@rahmal authored
Showing with 11 additions and 9 deletions.
  1. +1 −0  .gitignore
  2. +10 −9 lib/rconfig.rb
View
1  .gitignore
@@ -5,3 +5,4 @@
*.*~
.rakeTasks
.idea
+*.log
View
19 lib/rconfig.rb
@@ -23,18 +23,19 @@
$:.unshift File.dirname(__FILE__)
-require 'socket'
-require 'yaml'
require 'rubygems'
-require 'active_support'
-require 'active_support/core_ext'
-require 'active_support/core_ext/hash/conversions'
-require 'active_support/core_ext/hash/indifferent_access'
-require 'rconfig/core_ext/hash'
+autoload :Socket, 'socket'
+autoload :YAML, 'yaml'
+
+autoload :Hash, 'active_support/core_ext/hash/conversions'
+autoload :HashWithIndifferentAccess, 'active_support/core_ext/hash/indifferent_access'
+
+autoload :Hash, 'rconfig/core_ext/hash'
+autoload :ConfigHash, 'rconfig/config_hash'
+autoload :PropertiesFileParser, 'rconfig/properties_file_parser'
+
require 'rconfig/core_ext/object'
-require 'rconfig/config_hash'
-require 'rconfig/properties_file_parser'
require 'rconfig/exceptions'
require 'rconfig/constants'
require 'rconfig/class_variables'
Please sign in to comment.
Something went wrong with that request. Please try again.