lib/rails_imager.rb in rails_imager-0.0.19 vs lib/rails_imager.rb in rails_imager-0.0.20
- old
+ new
@@ -12,14 +12,23 @@
elsif name.to_s.end_with?("Helper")
path = "#{File.dirname(__FILE__)}/../app/helpers/rails_imager/#{::StringCases.camel_to_snake(name)}.rb"
else
path = "#{File.dirname(__FILE__)}/rails_imager/#{::StringCases.camel_to_snake(name)}.rb"
end
-
+
if File.exists?(path)
require path
return const_get(name) if const_defined?(name)
end
-
+
super
+ end
+
+ @config = RailsImager::Config.new
+ def self.config
+ if block_given?
+ yield @config
+ else
+ return @config
+ end
end
end