Class: SafeDb::Set
Overview
The set use case is the generic tool for setting configuration directives inside the safe workstation INI formatted file.
The mirror of this use case is unset.
Observable Value
The configuration directive will eithe be created (or will overwrite) an existing directive with the same path.
The configuration file is printed to inform the user of the current state.
Alternative / Error Flows
Error - if the directive path is not composed of two (fwd slash separated) parts Error - if the directive path and/or value contains (or not) unacceptable characters
Constant Summary
Constants inherited from UseCase
UseCase::APP_DIR_NAME, UseCase::COMMANDMENT, UseCase::ENV_VAR_KEY_NAME, UseCase::ENV_VAR_PREFIX_A, UseCase::ENV_VAR_PREFIX_B, UseCase::FILE_CONTENT_KEY, UseCase::FILE_KEY_PREFIX, UseCase::FILE_NAME_KEY
Instance Attribute Summary collapse
-
#domain_name ⇒ Object
writeonly
Sets the attribute domain_name.
Attributes inherited from UseCase
Instance Method Summary collapse
-
#execute ⇒ Object
The use use case is borrowed from the database world and it denotes the domain to be used for now (and evermore) for this workstation until another use command is issued.
- #pre_validation ⇒ Object
Methods inherited from UseCase
#check_post_conditions, #check_pre_conditions, #cleanup, #config_directory, #config_file, #flow_of_events, #get_master_database, #initialize, #post_validation
Constructor Details
This class inherits a constructor from SafeDb::UseCase
Instance Attribute Details
#domain_name=(value) ⇒ Object (writeonly)
Sets the attribute domain_name
24 25 26 |
# File 'lib/usecase/set.rb', line 24 def domain_name=(value) @domain_name = value end |
Instance Method Details
#execute ⇒ Object
The use use case is borrowed from the database world and it denotes the domain to be used for now (and evermore) for this workstation until another use command is issued.
The parameter domain_name must be set after an object instance is acquired but before the execute method runs.
33 34 |
# File 'lib/usecase/set.rb', line 33 def execute end |
#pre_validation ⇒ Object
37 38 |
# File 'lib/usecase/set.rb', line 37 def pre_validation end |