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

- old
+ new

@@ -1,29 +1,30 @@ require 'eventmachine' require 'json' require 'logger' -require 'weeter/configuration' -require 'weeter/cli' -require 'weeter/plugins' -require 'weeter/runner' -require 'weeter/twitter' +module Weeter + extend self + autoload 'Cli', 'weeter/cli' + autoload 'Plugins', 'weeter/plugins' + autoload 'Runner', 'weeter/runner' + autoload 'Twitter', 'weeter/twitter' + autoload 'Limitator', 'weeter/limitator' + autoload 'Configuration', 'weeter/configuration' -module Weeter - - def self.configure + def configure yield Configuration.instance end - - def self.logger + + def logger @logger ||= begin if Configuration.instance.log_path == false nil elsif Configuration.instance.log_path Logger.new(Configuration.instance.log_path) else Logger.new(STDOUT) end end end -end \ No newline at end of file +end