Class: ActiveRecord::DataClassification::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/active_record/data_classification/configuration.rb', line 16

def initialize
  @default_classification       = :Private
  @load_models_block            = -> { }
  @table_name_transformer_block = ->(table_name) { table_name }
  @confidential_class_names     = []
  @excluded_table_patterns      = []
  @ignored_tables              = [
    "schema_migrations",
    "ar_internal_metadata",
  ]
end

Instance Attribute Details

#confidential_class_namesObject

Returns the value of attribute confidential_class_names.



8
9
10
# File 'lib/active_record/data_classification/configuration.rb', line 8

def confidential_class_names
  @confidential_class_names
end

#default_classificationObject

Returns the value of attribute default_classification.



8
9
10
# File 'lib/active_record/data_classification/configuration.rb', line 8

def default_classification
  @default_classification
end

#excluded_table_patternsObject

Returns the value of attribute excluded_table_patterns.



8
9
10
# File 'lib/active_record/data_classification/configuration.rb', line 8

def excluded_table_patterns
  @excluded_table_patterns
end

#ignored_tablesObject

Returns the value of attribute ignored_tables.



8
9
10
# File 'lib/active_record/data_classification/configuration.rb', line 8

def ignored_tables
  @ignored_tables
end

#load_models_blockObject (readonly)

Returns the value of attribute load_models_block.



13
14
15
# File 'lib/active_record/data_classification/configuration.rb', line 13

def load_models_block
  @load_models_block
end

#table_name_transformer_blockObject (readonly)

Returns the value of attribute table_name_transformer_block.



13
14
15
# File 'lib/active_record/data_classification/configuration.rb', line 13

def table_name_transformer_block
  @table_name_transformer_block
end

Instance Method Details

#load_models(&block) ⇒ Object



28
29
30
# File 'lib/active_record/data_classification/configuration.rb', line 28

def load_models(&block)
  @load_models_block = block
end

#transform_table_name(&block) ⇒ Object



32
33
34
# File 'lib/active_record/data_classification/configuration.rb', line 32

def transform_table_name(&block)
  @table_name_transformer_block = block
end