Class: Shogun::Command::Database

Inherits:
Object
  • Object
show all
Defined in:
lib/shogun/command/database.rb

Instance Method Summary collapse

Constructor Details

#initialize(namespace, command, *parameters) ⇒ Database

Returns a new instance of Database.



4
5
6
7
8
# File 'lib/shogun/command/database.rb', line 4

def initialize(namespace, command, *parameters)
  @namespace = namespace
  @command = command
  @parameters = parameters
end

Instance Method Details

#executeObject



10
11
12
13
14
15
16
17
18
# File 'lib/shogun/command/database.rb', line 10

def execute
  case @command
    when "reset" then
      ::Shogun::Database.setup!(logger: Logger.new(STDOUT))
    when "console" then
      ::Shogun::Database.new(logger: Logger.new(STDOUT))
      binding.pry
  end
end