Sha256: 3ad04821a3308999ae2d54c0a39fd2e7e00b921d824420e011346138714e05a4
Contents?: true
Size: 507 Bytes
Versions: 41
Compression:
Stored size: 507 Bytes
Contents
module Rasti class App class Permission < String SEPARATOR = '.' def initialize(*args) super Array(args).flatten.map(&:to_s).join(SEPARATOR) end def include?(permission) other = Permission.new permission sections.count <= other.sections.count && self == other.sections.take(sections.count).join(SEPARATOR) end def sections split SEPARATOR end def last_section sections.last end end end end
Version data entries
41 entries across 41 versions & 1 rubygems