Class: CopyBot::StepFactory
- Inherits:
-
Object
- Object
- CopyBot::StepFactory
- Defined in:
- lib/copy_bot/step_factory.rb
Instance Attribute Summary collapse
-
#step_name ⇒ Object
readonly
Returns the value of attribute step_name.
Instance Method Summary collapse
- #build ⇒ Class<CopyBot::Steps::BaseStep>
-
#initialize(step_name) ⇒ StepFactory
constructor
A new instance of StepFactory.
Constructor Details
#initialize(step_name) ⇒ StepFactory
Returns a new instance of StepFactory.
6 7 8 |
# File 'lib/copy_bot/step_factory.rb', line 6 def initialize(step_name) @step_name = step_name end |
Instance Attribute Details
#step_name ⇒ Object (readonly)
Returns the value of attribute step_name.
3 4 5 |
# File 'lib/copy_bot/step_factory.rb', line 3 def step_name @step_name end |
Instance Method Details
#build ⇒ Class<CopyBot::Steps::BaseStep>
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/copy_bot/step_factory.rb', line 11 def build # rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity case step_name when :download_remote_db_dump ::CopyBot::Steps::DownloadRemoteDbDump when :create_local_db_backup ::CopyBot::Steps::CreateLocalDbBackup when :drop_local_db_tables ::CopyBot::Steps::DropLocalDbTables when :import_remote_db_to_local_db ::CopyBot::Steps::ImportRemoteDbToLocalDb when :run_migrations_on_local_db ::CopyBot::Steps::RunMigrationsOnLocalDb when :delete_remote_db_dump ::CopyBot::Steps::DeleteRemoteDbDump when :execute_custom_command ::CopyBot::Steps::ExecuteCustomCommand else raise ArgumentError end end |