Class: BlastRadius::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/blast_radius/configuration.rb', line 14

def initialize
  @max_depth = 10
  @default_format = :text
  @include_nullify = false
  @include_restrict = false
  @exclude_models = [/^HABTM_/, /^ActiveStorage::/]
  @enable_web_ui = false
  @colorize = true
  @colors = {
    destroy: :red,
    delete_all: :yellow,
    destroy_async: :magenta,
    nullify: :blue,
    restrict: :gray
  }
end

Instance Attribute Details

#colorizeObject

Returns the value of attribute colorize.



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

def colorize
  @colorize
end

#colorsObject

Returns the value of attribute colors.



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

def colors
  @colors
end

#default_formatObject

Returns the value of attribute default_format.



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

def default_format
  @default_format
end

#enable_web_uiObject

Returns the value of attribute enable_web_ui.



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

def enable_web_ui
  @enable_web_ui
end

#exclude_modelsObject

Returns the value of attribute exclude_models.



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

def exclude_models
  @exclude_models
end

#include_nullifyObject

Returns the value of attribute include_nullify.



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

def include_nullify
  @include_nullify
end

#include_restrictObject

Returns the value of attribute include_restrict.



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

def include_restrict
  @include_restrict
end

#max_depthObject

Returns the value of attribute max_depth.



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

def max_depth
  @max_depth
end