lib/loopiator.rb in loopiator-0.2.0 vs lib/loopiator.rb in loopiator-0.3.0
- old
+ new
@@ -1,19 +1,31 @@
-module Loopiator
- VERSION = "0.2.0"
+require File.join(File.dirname(__FILE__), 'loopiator/railtie') if defined? Rails
+require File.join(File.dirname(__FILE__), 'loopiator/extensions/hash') if !Hash.instance_methods(false).include?(:symbolize_keys!)
+require File.join(File.dirname(__FILE__), 'loopiator/configuration')
+require File.join(File.dirname(__FILE__), 'loopiator/logger')
+require File.join(File.dirname(__FILE__), 'loopiator/errors')
+require File.join(File.dirname(__FILE__), 'loopiator/utilities')
+require File.join(File.dirname(__FILE__), 'loopiator/models/domain')
+require File.join(File.dirname(__FILE__), 'loopiator/domains')
+require File.join(File.dirname(__FILE__), 'loopiator/credits')
+require File.join(File.dirname(__FILE__), 'loopiator/client')
- require File.join(File.dirname(__FILE__), 'loopiator/railtie') if defined?(Rails)
+module Loopiator
+ VERSION = "0.3.0"
- if (!Hash.instance_methods(false).include?(:symbolize_keys!))
- require File.join(File.dirname(__FILE__), 'loopiator/extensions/hash')
+ class << self
+ attr_writer :configuration
end
-
- require File.join(File.dirname(__FILE__), 'loopiator/logger')
- require File.join(File.dirname(__FILE__), 'loopiator/errors')
- require File.join(File.dirname(__FILE__), 'loopiator/models/domain')
+ def self.configuration
+ @configuration ||= Configuration.new
+ end
- require File.join(File.dirname(__FILE__), 'loopiator/domains')
- require File.join(File.dirname(__FILE__), 'loopiator/credits')
-
- require File.join(File.dirname(__FILE__), 'loopiator/client')
+ def self.reset
+ @configuration = Configuration.new
+ end
+
+ def self.configure
+ yield(self.configuration)
+ end
+
end
\ No newline at end of file