class Mumukit::Auth::SingleGrant
Public Class Methods
new(slug)
click to toggle source
# File lib/mumukit/auth/grant.rb, line 81 def initialize(slug) @slug = slug.normalize end
Public Instance Methods
allows?(resource_slug)
click to toggle source
# File lib/mumukit/auth/grant.rb, line 85 def allows?(resource_slug) resource_slug = resource_slug.to_mumukit_slug.normalize! resource_slug.match_first(@slug.first) && resource_slug.match_second(@slug.second) end
to_mumukit_slug()
click to toggle source
# File lib/mumukit/auth/grant.rb, line 94 def to_mumukit_slug @slug end
to_s()
click to toggle source
# File lib/mumukit/auth/grant.rb, line 90 def to_s @slug.to_s end