Skip to content
Browse files

extracted role class

  • Loading branch information...
1 parent d36bb54 commit bfbce4336dd739b8562174ccb0c50bba2e348fae @kristianmandrup committed Jan 2, 2011
Showing with 12 additions and 10 deletions.
  1. +1 −10 lib/roles_generic/role.rb
  2. +11 −0 lib/roles_generic/roles_base.rb
View
11 lib/roles_generic/role.rb 100755 → 100644
@@ -1,13 +1,4 @@
-module Roles::Base
- def valid_roles_are(*role_list)
- strategy_class.valid_roles = role_list.to_symbols
- if role_class_name
- role_list.each do |name|
- role_class_name.new(name)
- end
- end
- end
-end
+require 'roles_generic/roles_base'
class Role
attr_accessor :name
View
11 lib/roles_generic/roles_base.rb
@@ -0,0 +1,11 @@
+module Roles::Base
+ def valid_roles_are(*role_list)
+ strategy_class.valid_roles = role_list.to_symbols
+ if role_class_name
+ role_list.each do |name|
+ role_class_name.new(name)
+ end
+ end
+ end
+end
+

0 comments on commit bfbce43

Please sign in to comment.
Something went wrong with that request. Please try again.