Module: Rmap::Commands

Defined in:
lib/rmap/commands.rb

Defined Under Namespace

Modules: Generate

Class Method Summary collapse

Class Method Details

.consoleObject



9
10
11
12
13
14
15
16
17
# File 'lib/rmap/commands.rb', line 9

def self.console
  db = Rmap::Database.new
  
  if Rmap.const_defined? :CONF_ROOT
    db.run("#{Rmap::CONF_ROOT}/conf.rmap.rb")
  end

  Ripl.start :binding => db.bindings
end

.current_migrationObject



19
20
21
# File 'lib/rmap/commands.rb', line 19

def self.current_migration
  puts db.current_migration
end

.migrate(options = {}) ⇒ Object



76
77
78
79
80
# File 'lib/rmap/commands.rb', line 76

def self.migrate(options = {})
  db = self.db
  db.migrate(options)
  puts "At migration: #{db.current_migration}"
end