Module: SimpleRoles::Packager

Extended by:
Packager
Included in:
Packager
Defined in:
lib/simple_roles/packager.rb

Instance Method Summary collapse

Instance Method Details

#package(clazz, strategy = config.strategy) ⇒ Object



5
6
7
8
9
10
# File 'lib/simple_roles/packager.rb', line 5

def package clazz, strategy = config.strategy
  SimpleRoles::Configuration.user_models << clazz

  clazz.send :include, SimpleRoles::config.strategy_class(strategy)::Persistence
  clazz.send :include, SimpleRoles::config.strategy_class(strategy)::RolesMethods
end