roles_generic 0.3.7.1 → 0.3.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/roles_generic/generic/role.rb +7 -5
- data/roles_generic.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.7.
|
1
|
+
0.3.7.2
|
@@ -6,17 +6,19 @@ module Roles::Generic::Role
|
|
6
6
|
end
|
7
7
|
|
8
8
|
module ClassMethods
|
9
|
+
attr_accessor :class_constant
|
10
|
+
|
9
11
|
def role_class_name
|
10
|
-
@role_class_name
|
11
|
-
end
|
12
|
-
|
13
|
-
def role_class class_constant
|
14
12
|
const = class_constant.to_s.camelize
|
15
13
|
begin
|
16
|
-
@role_class_name
|
14
|
+
@role_class_name ||= "#{const}".constantize
|
17
15
|
rescue
|
18
16
|
puts "Role class constant '#{const}' is not defined so it could not be set!"
|
19
17
|
end
|
20
18
|
end
|
19
|
+
|
20
|
+
def role_class class_constant
|
21
|
+
@class_constant = class_constant
|
22
|
+
end
|
21
23
|
end
|
22
24
|
end
|
data/roles_generic.gemspec
CHANGED