Module: Roles::Generic::Role::ClassMethods
- Defined in:
- lib/roles_generic/generic/role.rb
Instance Method Summary collapse
Instance Method Details
#role_class(class_constant) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/roles_generic/generic/role.rb', line 13 def role_class class_constant const = class_constant.to_s.camelize begin @role_class_name = "#{const}".constantize rescue puts "Role class constant '#{const}' is not defined so it could not be set!" end end |
#role_class_name ⇒ Object
9 10 11 |
# File 'lib/roles_generic/generic/role.rb', line 9 def role_class_name @role_class_name end |