summaryrefslogtreecommitdiff
path: root/app/policies/base_policy.rb
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-08-30 11:42:23 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2016-08-30 11:42:23 -0700
commit482795a90830a4a74b675ef7afc266ca292f6655 (patch)
tree79a02df490611afea8a6d4bf2990d7b914bbe879 /app/policies/base_policy.rb
parentb7d300001319e38ddb6e57764d51d5d838689ecd (diff)
downloadgitlab-ce-482795a90830a4a74b675ef7afc266ca292f6655.tar.gz
implement RuleSet#size for tests
Diffstat (limited to 'app/policies/base_policy.rb')
-rw-r--r--app/policies/base_policy.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/base_policy.rb b/app/policies/base_policy.rb
index 6a1a7d75ee6..cc82793b716 100644
--- a/app/policies/base_policy.rb
+++ b/app/policies/base_policy.rb
@@ -6,6 +6,10 @@ class BasePolicy
@cannot_set = cannot_set
end
+ def size
+ to_set.size
+ end
+
def self.empty
new(Set.new, Set.new)
end