Class: SimpleCommandDispatcher::Services::OptionsService
- Inherits:
-
Object
- Object
- SimpleCommandDispatcher::Services::OptionsService
- Defined in:
- lib/simple_command_dispatcher/services/options_service.rb
Overview
Handles options for command execution and ensures proper initialization.
Constant Summary collapse
- DEFAULT_OPTIONS =
Default options for command execution
{ debug: false }.freeze
Instance Method Summary collapse
-
#debug? ⇒ Boolean
Returns true if debug mode is enabled.
-
#initialize(options: {}) ⇒ OptionsService
constructor
Initializes the options service with the provided options merged with defaults.
Constructor Details
#initialize(options: {}) ⇒ OptionsService
Initializes the options service with the provided options merged with defaults.
20 21 22 |
# File 'lib/simple_command_dispatcher/services/options_service.rb', line 20 def initialize(options: {}) = DEFAULT_OPTIONS.merge() end |
Instance Method Details
#debug? ⇒ Boolean
Returns true if debug mode is enabled. When enabled, debug logging will show command execution flow.
28 29 30 |
# File 'lib/simple_command_dispatcher/services/options_service.rb', line 28 def debug? [:debug] end |