Sha256: 5cb490577f68349f1755010e76ffca6f00b597fe5587733975f19e10ffcf490d
Contents?: true
Size: 385 Bytes
Versions: 18
Compression:
Stored size: 385 Bytes
Contents
require 'triad' require 'surrounded/context_errors' module Surrounded module Context class RoleMap < Triad def role?(role) keys.include?(role) end def role_player?(object) !values(object).empty? rescue ::Triad::ValueNotPresent false end def assigned_player(role) values(role).first end end end end
Version data entries
18 entries across 18 versions & 1 rubygems