simple_can 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_can.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89860df88e70747400564a2d29b658bfde6f592e
|
4
|
+
data.tar.gz: b538368c77160276d660da2ab7aad9ef375761f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75fc840b64b84c67e8b7622614daaf94d1e1951ad9ad0a94cad63aa66acd969fbffa9a27a19612179ca91a0106e2b43e315470153d8c92c72de55bff5f234fe8
|
7
|
+
data.tar.gz: d5bb46ccb02df98b3118a4fd5e34dbd20ceee1777463e92985e4f379f78b0e96acb9586a02ca409c135410a8af35601759c634a4d3a30d9c69e9743c2c83431a
|
data/lib/simple_can.rb
CHANGED
@@ -8,13 +8,14 @@ module SimpleCan
|
|
8
8
|
class Unauthorized < StandardError; end
|
9
9
|
|
10
10
|
def self.included(mod)
|
11
|
+
mod.strategy_set!
|
12
|
+
|
11
13
|
meta = class << mod; self; end
|
12
14
|
meta.send(:alias_method, :orig_method_added, :method_added)
|
13
15
|
meta.send(:alias_method, :orig_singleton_method_added,
|
14
16
|
:singleton_method_added)
|
15
17
|
mod.extend(ClassMethods)
|
16
18
|
|
17
|
-
mod.strategy_set!
|
18
19
|
strategy.roles.each do |role|
|
19
20
|
[meta, mod].each do |scope|
|
20
21
|
scope.send(:define_method, "#{role}?") do
|