module RighterForResource

Public Instance Methods

create_righter_right(right_name_prefix, options = {}) click to toggle source
# File lib/injections/righter_for_resource.rb, line 72
def create_righter_right(right_name_prefix, options = {})
  options = options.merge(resource: self)
  self.class.create_righter_right(right_name_prefix, options)
end
destroy_righter_right(right_name_prefix, options = {}) click to toggle source
# File lib/injections/righter_for_resource.rb, line 77
def destroy_righter_right(right_name_prefix, options = {})
  options = options.merge(resource: self)
  self.class.destroy_righter_right(right_name_prefix, options)
end
righter_right(right_name_prefix, options = {}) click to toggle source
# File lib/injections/righter_for_resource.rb, line 82
def righter_right(right_name_prefix, options = {})
  options = options.merge(resource: self)
  self.class.righter_right(right_name_prefix, options)
end
righter_right_human_name(right_name_prefix) click to toggle source
# File lib/injections/righter_for_resource.rb, line 96
def righter_right_human_name(right_name_prefix)
  "#{right_name_prefix} #{righter_right_resource_class} #{righter_right_resource_id}"
end
righter_right_resource_class() click to toggle source
# File lib/injections/righter_for_resource.rb, line 87
def righter_right_resource_class
  self.class.name
end
righter_right_resource_id() click to toggle source
# File lib/injections/righter_for_resource.rb, line 91
def righter_right_resource_id
  return id if respond_to?(:id)
  fail RighterError.new("Don't know how to compute instance_id for resource role. Please implement righter_right_resource_id method for this resource.")
end