Class: CanTango::PermitEngine::Builder::SpecialPermits

Inherits:
Base
  • Object
show all
Defined in:
lib/cantango/permit_engine/builder/special_permits.rb

Instance Attribute Summary

Attributes inherited from Base

#ability

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Helpers::Debug

#debug

Constructor Details

This class inherits a constructor from CanTango::PermitEngine::Builder::Base

Instance Method Details

#buildObject



5
6
7
# File 'lib/cantango/permit_engine/builder/special_permits.rb', line 5

def build
  special_permits.map{|role| create_permit(role)}.compact
end

#finderObject



13
14
15
# File 'lib/cantango/permit_engine/builder/special_permits.rb', line 13

def finder
  CanTango::Permits::RolePermit::Finder
end

#special_permitsObject



9
10
11
# File 'lib/cantango/permit_engine/builder/special_permits.rb', line 9

def special_permits
  [:system, :any]
end