Class: Keela::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/keela/configuration.rb', line 23

def initialize
  @extensions = %w[rb haml erb].freeze
  @directory_patterns = %w[
    app/**/*.%<ext>s
    lib/**/*.%<ext>s
    config/**/*.%<ext>s
  ].freeze
  @excluded_path = nil
  @baseline_path = nil
  @required_directory = nil
  @show_progress = true
end

Instance Attribute Details

#baseline_pathObject

Path to YAML file tracking known unused items (baseline)



15
16
17
# File 'lib/keela/configuration.rb', line 15

def baseline_path
  @baseline_path
end

#directory_patternsObject

Directory patterns to scan (use %s as placeholder for extension)



9
10
11
# File 'lib/keela/configuration.rb', line 9

def directory_patterns
  @directory_patterns
end

#excluded_pathObject

Path to YAML file listing excluded items (won't be flagged as unused)



12
13
14
# File 'lib/keela/configuration.rb', line 12

def excluded_path
  @excluded_path
end

#extensionsObject

File extensions to scan for code usage



6
7
8
# File 'lib/keela/configuration.rb', line 6

def extensions
  @extensions
end

#required_directoryObject

Optional directory that must exist for scanning to proceed (e.g., "ee" for GitLab)



18
19
20
# File 'lib/keela/configuration.rb', line 18

def required_directory
  @required_directory
end

#show_progressObject

Whether to show progress during scanning



21
22
23
# File 'lib/keela/configuration.rb', line 21

def show_progress
  @show_progress
end