Class: Packs::Configuration

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

Constant Summary collapse

OnPackageTodoLintFailure =
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.



27
28
29
30
31
32
# File 'lib/packs/configuration.rb', line 27

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

Instance Attribute Details

#enforce_dependenciesObject



35
36
37
# File 'lib/packs/configuration.rb', line 35

def enforce_dependencies
  @enforce_dependencies
end

#on_package_todo_lint_failureObject

Returns the value of attribute on_package_todo_lint_failure.



24
25
26
# File 'lib/packs/configuration.rb', line 24

def on_package_todo_lint_failure
  @on_package_todo_lint_failure
end

#use_pksObject

Returns the value of attribute use_pks.



17
18
19
# File 'lib/packs/configuration.rb', line 17

def use_pks
  @use_pks
end

#user_event_loggerObject

Returns the value of attribute user_event_logger.



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

def user_event_logger
  @user_event_logger
end

Instance Method Details

#bust_cache!Object



40
41
42
# File 'lib/packs/configuration.rb', line 40

def bust_cache!
  @enforce_dependencies = default_enforce_dependencies
end

#default_enforce_dependenciesObject



45
46
47
# File 'lib/packs/configuration.rb', line 45

def default_enforce_dependencies
  true
end