lib/table_cloth.rb in table_cloth-0.3.0.beta2 vs lib/table_cloth.rb in table_cloth-0.3.0.beta3
- old
+ new
@@ -1,12 +1,12 @@
require "action_view"
require "active_support/core_ext/class"
require "table_cloth/version"
require "table_cloth/configurable_elements"
-require "table_cloth/base"
module TableCloth
+ autoload :Base, "table_cloth/base"
autoload :Configuration, "table_cloth/configuration"
autoload :Builder, "table_cloth/builder"
autoload :Column, "table_cloth/column"
autoload :ColumnJury, "table_cloth/column_jury"
autoload :Presenter, "table_cloth/presenter"
@@ -18,13 +18,14 @@
module Extensions
autoload :Actions, "table_cloth/extensions/actions"
end
- def config_for(type)
- Configuration.config_for(type).dup
+ class << self
+ def config
+ @config ||= Configuration.new
+ end
end
- module_function :config_for
end
TableCloth::Base.presenter ::TableCloth::Presenters::Default
ActionView::Base.send(:include, TableCloth::ActionViewExtension)
\ No newline at end of file