Class: WordPressTools::Database

Inherits:
Thor
  • Object
show all
Includes:
CLIHelper
Defined in:
lib/wordpress_tools/database.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CLIHelper

#error, #executable_bit_command, #git_installed?, #info, #move_command, #run_command, #success, #unzip, #void, #warning

Instance Attribute Details

#db_nameObject (readonly)

Returns the value of attribute db_name.



5
6
7
# File 'lib/wordpress_tools/database.rb', line 5

def db_name
  @db_name
end

Instance Method Details

#create(db_name = "wordpress") ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/wordpress_tools/database.rb', line 9

def create(db_name = "wordpress")
  @db_name = db_name

  info("Creating database '#{db_name}'...")
  
  create_database
  success("Database #{db_name} created")
end