Class: CanTango::Config::Permits

Inherits:
Object
  • Object
show all
Includes:
Disabling, Enabling, Execution, Registration, Tracking, Helpers::Debug, Registry::Permit, Singleton
Defined in:
lib/cantango/permits_ext/config/permits.rb,
lib/cantango/permits_ext/config/permits/key.rb,
lib/cantango/permits_ext/config/permits/types.rb,
lib/cantango/permits_ext/config/permits/accounts.rb,
lib/cantango/permits_ext/config/permits/enabling.rb,
lib/cantango/permits_ext/config/permits/tracking.rb,
lib/cantango/permits_ext/config/permits/disabling.rb,
lib/cantango/permits_ext/config/permits/execution.rb,
lib/cantango/permits_ext/config/permits/registration.rb

Defined Under Namespace

Modules: Disabling, Enabling, Execution, Registration, Tracking Classes: Accounts, Key, Types

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Registration

#register, #register_permit, #register_permit_type

Methods included from Permit::Helper::Naming

#account_name, #permit_name, #permit_type

Methods included from Disabling

#disable_for, #disabled, #disabled?, #disabled_for

Methods included from Enabling

#enable_all!, #enable_all_for

Methods included from Tracking

#allowed, #denied

Methods included from Execution

#clear_executed!, #executed, #executed_for, #was_executed

Methods included from Registry::Permit

#all, #registered_for, #registry_for, #show_all

Instance Attribute Details

#availableObject



21
22
23
# File 'lib/cantango/permits_ext/config/permits.rb', line 21

def available
  @available ||= default_permits
end

#default_permitsObject



25
26
27
# File 'lib/cantango/permits_ext/config/permits.rb', line 25

def default_permits
  @default_permits ||= {}
end

Instance Method Details

#accountsObject



29
30
31
# File 'lib/cantango/permits_ext/config/permits.rb', line 29

def accounts
  Accounts.instance
end

#keyObject



38
39
40
# File 'lib/cantango/permits_ext/config/permits.rb', line 38

def key
  Key.instance
end

#typesObject

permit types



34
35
36
# File 'lib/cantango/permits_ext/config/permits.rb', line 34

def types
  Types.instance
end