Class: UsePackwerk::Configuration

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/use_packwerk/configuration.rb

Constant Summary collapse

OnDeprecatedReferencesLintFailure =
T.type_alias do
  T.proc.params(output: String).void
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



24
25
26
27
28
# File 'lib/use_packwerk/configuration.rb', line 24

def initialize
  @enforce_dependencies = T.let(default_enforce_dependencies, T::Boolean)
  @user_event_logger = T.let(DefaultUserEventLogger.new, UserEventLogger)
  @on_deprecated_references_lint_failure = T.let(->(output) {}, OnDeprecatedReferencesLintFailure)
end

Instance Attribute Details

#enforce_dependenciesObject



31
32
33
# File 'lib/use_packwerk/configuration.rb', line 31

def enforce_dependencies
  @enforce_dependencies
end

#on_deprecated_references_lint_failureObject

Returns the value of attribute on_deprecated_references_lint_failure.



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

def on_deprecated_references_lint_failure
  @on_deprecated_references_lint_failure
end

#user_event_loggerObject

Returns the value of attribute user_event_logger.



14
15
16
# File 'lib/use_packwerk/configuration.rb', line 14

def user_event_logger
  @user_event_logger
end

Instance Method Details

#bust_cache!Object



36
37
38
# File 'lib/use_packwerk/configuration.rb', line 36

def bust_cache!
  @enforce_dependencies = default_enforce_dependencies
end

#default_enforce_dependenciesObject



41
42
43
# File 'lib/use_packwerk/configuration.rb', line 41

def default_enforce_dependencies
  true
end