Class: HecksAdapters::SQLDatabase::CLI::GenerateDomainMigrations

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/cli/generate_domain_migrations.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#migration_builder=(value) ⇒ Object

Sets the attribute migration_builder

Parameters:

  • value

    the value to set the attribute migration_builder to.



6
7
8
# File 'lib/cli/generate_domain_migrations.rb', line 6

def migration_builder=(value)
  @migration_builder = value
end

Class Method Details

.source_rootObject



12
13
14
# File 'lib/cli/generate_domain_migrations.rb', line 12

def self.source_root
  File.dirname(__FILE__) + '/templates/'
end

Instance Method Details

#create_migration_fileObject



16
17
18
19
# File 'lib/cli/generate_domain_migrations.rb', line 16

def create_migration_file
  @migration_builder = MigrationBuilder.new(self, DOMAIN)
  @migration_builder.call
end

#load_domain_specObject



8
9
10
# File 'lib/cli/generate_domain_migrations.rb', line 8

def load_domain_spec
  load('Domain')
end