Class: StimulusAudit::Configuration
- Inherits:
-
Object
- Object
- StimulusAudit::Configuration
- Defined in:
- lib/stimulus_audit/configuration.rb
Instance Attribute Summary collapse
-
#controller_paths ⇒ Object
Returns the value of attribute controller_paths.
-
#view_paths ⇒ Object
Returns the value of attribute view_paths.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 |
# File 'lib/stimulus_audit/configuration.rb', line 7 def initialize reset end |
Instance Attribute Details
#controller_paths ⇒ Object
Returns the value of attribute controller_paths.
5 6 7 |
# File 'lib/stimulus_audit/configuration.rb', line 5 def controller_paths @controller_paths end |
#view_paths ⇒ Object
Returns the value of attribute view_paths.
5 6 7 |
# File 'lib/stimulus_audit/configuration.rb', line 5 def view_paths @view_paths end |
Instance Method Details
#reset ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/stimulus_audit/configuration.rb', line 11 def reset base_path = StimulusAudit.root @view_paths = [ base_path.join("app/views/**/*.{html,erb,haml}").to_s, base_path.join("app/javascript/**/*.{js,jsx}").to_s, base_path.join("app/components/**/*.{html,erb,haml,rb}").to_s ] @controller_paths = [ base_path.join("app/javascript/controllers/**/*.{js,ts}").to_s ] end |