| Class | Authorization::AuthorizationRule |
| In: |
lib/authorization.rb
|
| Parent: | Object |
| attributes | [R] | |
| context | [R] | |
| privileges | [R] | |
| role | [R] |
# File lib/authorization.rb, line 253
253: def initialize (role, privileges_or_context = [], context = nil)
254: @role = role
255: @privileges = Set.new
256: if privileges_or_context.is_a?(Array)
257: @context = context
258: append_privileges(privileges_or_context)
259: else
260: @context = privileges_or_context
261: end
262: @attributes = []
263: end
# File lib/authorization.rb, line 269
269: def append_attribute (attribute)
270: @attributes << attribute
271: end
# File lib/authorization.rb, line 265
265: def append_privileges (privs)
266: @privileges.merge(privs)
267: end