From 482795a90830a4a74b675ef7afc266ca292f6655 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 30 Aug 2016 11:42:23 -0700 Subject: implement RuleSet#size for tests --- app/policies/base_policy.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/policies') 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 -- cgit v1.2.1