Method: CEML::Incident#rolematch

Defined in:
lib/ceml/models/incident.rb

#rolematch(specified_roles) ⇒ Object



23
24
25
26
# File 'lib/ceml/models/incident.rb', line 23

def rolematch(specified_roles)
  expanded = roles.map{ |r| r == :agent ? [:agent, :agents] : r }.flatten.concat([:both, :all, :everyone, :them, :either])
  not (expanded & [*specified_roles]).empty?
end