lib/authoreyes/parser/priveleges_reader.rb in authoreyes-0.2.1 vs lib/authoreyes/parser/priveleges_reader.rb in authoreyes-0.2.2
- old
+ new
@@ -1,11 +1,11 @@
module Authoreyes
module Parser
# The PrivilegeReader handles the part of the authorization DSL in
# a +privileges+ block. Here, privilege hierarchies are defined.
class PrivilegesReader
- # TODO handle privileges with separated context
+ # TODO: handle privileges with separated context
attr_reader :privileges, :privilege_hierarchy # :nodoc:
def initialize # :nodoc:
@current_privelege = nil
@current_context = nil
@@ -45,10 +45,10 @@
# Specifies +privileges+ that are to be assigned as lower ones. Only to
# be used inside a privilege block.
def includes(*privileges)
raise DSLError,
- "includes only in privilege block" if @current_privelege.nil?
+ 'includes only in privilege block' if @current_privelege.nil?
privileges.each do |priv|
append_privilege priv
@privilege_hierarchy[@current_privelege] ||= []
@privilege_hierarchy[@current_privelege] << [priv, @current_context]
end