Class: CanTango::Permits::AccountPermit::Builder

Inherits:
CanTango::PermitEngine::Builder::Base show all
Defined in:
lib/cantango/permits/account_permit/builder.rb

Instance Attribute Summary

Attributes inherited from CanTango::PermitEngine::Builder::Base

#ability

Instance Method Summary collapse

Methods inherited from CanTango::PermitEngine::Builder::Base

#initialize

Methods included from Helpers::Debug

#debug

Constructor Details

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

Instance Method Details

#buildArray<RoleGroupPermit::Base>

builds a list of Permits for each role of the current ability user (or account)

Returns:

  • (Array<RoleGroupPermit::Base>)

    the role permits built for this ability



9
10
11
12
13
# File 'lib/cantango/permits/account_permit/builder.rb', line 9

def build
  return [] if !
  puts debug_msg if CanTango.debug?
  [permit].compact
end

#nameObject



15
16
17
# File 'lib/cantango/permits/account_permit/builder.rb', line 15

def name
  :account
end