Class: Lotus::Commands::DB::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/lotus/commands/db/console.rb

Overview

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, environment) ⇒ Console

Returns a new instance of Console.

Since:

  • 0.1.0



9
10
11
12
13
14
# File 'lib/lotus/commands/db/console.rb', line 9

def initialize(name, environment)
  @name        = name
  @environment = environment
  @env_options = environment.to_options
  @environment.require_application_environment
end

Instance Attribute Details

#env_optionsObject (readonly)

Since:

  • 0.1.0



7
8
9
# File 'lib/lotus/commands/db/console.rb', line 7

def env_options
  @env_options
end

#environmentObject (readonly)

Since:

  • 0.1.0



7
8
9
# File 'lib/lotus/commands/db/console.rb', line 7

def environment
  @environment
end

#nameObject (readonly)

Since:

  • 0.1.0



7
8
9
# File 'lib/lotus/commands/db/console.rb', line 7

def name
  @name
end

Instance Method Details

#startObject

Since:

  • 0.1.0



16
17
18
# File 'lib/lotus/commands/db/console.rb', line 16

def start
  exec connection_string
end