lib/weeter/configuration.rb in weeter-0.9.2 vs lib/weeter/configuration.rb in weeter-0.10.0

- old
+ new

@@ -1,22 +1,30 @@ require "singleton" -require "weeter/configuration/client_app_config" -require "weeter/configuration/twitter_config" - + module Weeter class Configuration include Singleton attr_accessor :log_path + autoload :ClientAppConfig, 'weeter/configuration/client_app_config' + autoload :TwitterConfig, 'weeter/configuration/twitter_config' + autoload :LimiterConfig, 'weeter/configuration/limiter_config' + + def twitter yield Configuration::TwitterConfig.instance if block_given? Configuration::TwitterConfig.instance end - + + def limiter + yield Configuration::LimiterConfig.instance if block_given? + Configuration::LimiterConfig.instance + end + def client_app @client_app_config ||= Configuration::ClientAppConfig.new yield @client_app_config if block_given? @client_app_config end end -end \ No newline at end of file +end