Class: SafeDb::Use

Inherits:
UseCase show all
Defined in:
lib/usecase/use.rb

Overview

The use use case borrowed from the database world denotes which domain will be used for now (and evermore) on the workstation until another use command is issued.

Observable Value

The workstation configuration file will point to the domain name specified marking it as the current and correct domain to use.

Alternative / Error Flows

Error - if the domain name is not listed in the configuration file. Error - if the (dictionary) path to the domain’s base does not exist

Constant Summary

Constants inherited from UseCase

SafeDb::UseCase::APP_DIR_NAME, SafeDb::UseCase::COMMANDMENT, SafeDb::UseCase::ENV_VAR_KEY_NAME, SafeDb::UseCase::ENV_VAR_PREFIX_A, SafeDb::UseCase::ENV_VAR_PREFIX_B, SafeDb::UseCase::FILE_CONTENT_KEY, SafeDb::UseCase::FILE_KEY_PREFIX, SafeDb::UseCase::FILE_NAME_KEY

Instance Attribute Summary collapse

Attributes inherited from UseCase

#from_script

Instance Method Summary collapse

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

Parameters:

  • value

    the value to set the attribute domain_name to.



21
22
23
# File 'lib/usecase/use.rb', line 21

def domain_name=(value)
  @domain_name = value
end

Instance Method Details

#executeObject

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.



30
31
# File 'lib/usecase/use.rb', line 30

def execute
end

#pre_validationObject



34
35
# File 'lib/usecase/use.rb', line 34

def pre_validation
end