Module: Migu
- Defined in:
- lib/migu.rb,
lib/migu/state.rb,
lib/migu/version.rb,
lib/migu/migrator.rb,
lib/migu/generator.rb,
lib/migu/migration.rb
Defined Under Namespace
Classes: Configuration, Error, Generator, Migration, Migrator, State
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
- .configuration(&block) ⇒ Object
-
.generate_config ⇒ Object
Your code goes here…
Class Method Details
.configuration(&block) ⇒ Object
35 36 37 38 39 |
# File 'lib/migu.rb', line 35 def self.configuration(&block) @configuration ||= Configuration.new block.call(@configuration) if block_given? @configuration end |
.generate_config ⇒ Object
Your code goes here…
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/migu.rb', line 17 def self.generate_config Dir.mkdir("migu") unless Dir.exist?("migu") filepath = "migu/config.rb" File.open(filepath, "w") do |file| file.write(<<-EOS) Migu.configuration do |config| config.before do # before hook end config.after do # after hook end end EOS end end |