Module: CanTango::Config::ClassMethods
- Included in:
- CanTango::Config
- Defined in:
- lib/cantango/config/class_methods.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cantango/config/class_methods.rb', line 4 def self.extended base base.class_eval do components.each do |conf_module| class_eval %{ def #{conf_module} &block conf = conf::#{conf_module.to_s.camelize}.instance yield conf if block conf end } end end end |
Instance Method Details
#components ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/cantango/config/class_methods.rb', line 18 def components [ :guest, :autoload, :user, :account, :models, :modes, :roles, :role_groups, :engines, :users, :accounts, :categories, :adapters, :debug, :localhosts, :orms, :hooks, :helpers ] end |