Sha256: adfc996a43065b19c772e50b03ea48997c504741dc6bcec01c80d7704869f744
Contents?: true
Size: 352 Bytes
Versions: 23
Compression:
Stored size: 352 Bytes
Contents
module Rasti class App class User attr_reader :name, :permissions def initialize(attributes={}) @name = attributes[:name] @permissions = attributes.fetch(:permissions, []) end def authorized?(permission) permissions.any? { |p| Permission.new(p).include? permission } end end end end
Version data entries
23 entries across 23 versions & 1 rubygems