Class: GdprAdmin::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/gdpr_admin/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
15
16
17
# File 'lib/gdpr_admin/configuration.rb', line 9

def initialize
  @tenant_class = 'Organization'
  @tenant_adapter = TenantAdapters::ActsAsTenantAdapter.new
  @data_policies_path = Rails.root.join('app', 'gdpr')
  @default_job_queue = :default
  @erasure_grace_period = 4.hours
  @export_grace_period = nil
  @rollback_on_failure = true
end

Instance Attribute Details

#data_policies_pathObject

Returns the value of attribute data_policies_path.



5
6
7
# File 'lib/gdpr_admin/configuration.rb', line 5

def data_policies_path
  @data_policies_path
end

#default_job_queueObject

Returns the value of attribute default_job_queue.



5
6
7
# File 'lib/gdpr_admin/configuration.rb', line 5

def default_job_queue
  @default_job_queue
end

#erasure_grace_periodObject

Returns the value of attribute erasure_grace_period.



5
6
7
# File 'lib/gdpr_admin/configuration.rb', line 5

def erasure_grace_period
  @erasure_grace_period
end

#export_grace_periodObject

Returns the value of attribute export_grace_period.



5
6
7
# File 'lib/gdpr_admin/configuration.rb', line 5

def export_grace_period
  @export_grace_period
end

#rollback_on_failureObject

Returns the value of attribute rollback_on_failure.



5
6
7
# File 'lib/gdpr_admin/configuration.rb', line 5

def rollback_on_failure
  @rollback_on_failure
end

#tenant_adapterObject



19
20
21
22
23
# File 'lib/gdpr_admin/configuration.rb', line 19

def tenant_adapter
  return @tenant_adapter unless @tenant_adapter.is_a?(Symbol)

  GdprAdmin::TenantAdapters.const_get("#{@tenant_adapter}_adapter".classify).new
end

#tenant_classObject

Returns the value of attribute tenant_class.



5
6
7
# File 'lib/gdpr_admin/configuration.rb', line 5

def tenant_class
  @tenant_class
end