lib/lazy_resource.rb in lazy_resource-0.3.0 vs lib/lazy_resource.rb in lazy_resource-0.3.2
- old
+ new
@@ -19,21 +19,40 @@
require 'active_support/core_ext/uri'
require 'lazy_resource/version'
require 'lazy_resource/errors'
+require 'lazy_resource/ext/typhoeus'
+
module LazyResource
extend ActiveSupport::Autoload
+ autoload :ConfigurationDelegate
autoload :Attributes
autoload :Mapping
autoload :Relation
autoload :Request
autoload :Resource
autoload :ResourceQueue
autoload :Types
autoload :UrlGeneration
def self.configure(&block)
- yield Resource
+ yield LazyResource::ConfigurationDelegate.new
+ end
+
+ def self.logger=(logger)
+ @logger = logger
+ end
+
+ def self.logger
+ @logger
+ end
+
+ def self.debug=(debug)
+ @debug = debug
+ end
+
+ def self.debug
+ @debug = @debug.nil? ? false : @debug
end
end