lib/ddr/auth/roles/role_set.rb in ddr-models-2.3.2 vs lib/ddr/auth/roles/role_set.rb in ddr-models-2.4.0.rc1
- old
+ new
@@ -1,7 +1,8 @@
module Ddr::Auth
module Roles
+ extend Deprecation
#
# Wraps a set of Roles
#
# @abstract
#
@@ -19,11 +20,11 @@
def initialize(role_set)
@role_set = role_set
end
def granted
- warn "[DEPRECATION] `granted` is deprecated." \
- " Use the RoleSet object directly (#{caller.first})."
+ Deprecation.warn(self.class, "`granted` is deprecated." \
+ " Use the RoleSet object directly.")
self
end
# Grants roles - i.e., adds them to the role set
# @example - default scope ("resource")