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 CHANGED
@@ -1 +1 @@
1
- 0.3.7.1
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 = "#{const}".constantize
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{roles_generic}
8
- s.version = "0.3.7.1"
8
+ s.version = "0.3.7.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kristian Mandrup"]
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 3
8
8
  - 7
9
- - 1
10
- version: 0.3.7.1
9
+ - 2
10
+ version: 0.3.7.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kristian Mandrup