class Crowbar::Client::Command::Database::Connect
Implementation for the database connect command
Public Instance Methods
args_with_options()
click to toggle source
# File lib/crowbar/client/command/database/connect.rb, line 29 def args_with_options args.easy_merge!( db_username: options.db_username, db_password: options.db_password, database: options.database, host: options.host, port: options.port ) end
execute()
click to toggle source
# File lib/crowbar/client/command/database/connect.rb, line 45 def execute request.process do |request| case request.code when 200 say "Successfully connected to database" else err request.parsed_response["error"] end end end
request()
click to toggle source
# File lib/crowbar/client/command/database/connect.rb, line 39 def request @request ||= Request::Database::Connect.new( args_with_options ) end