Class: Sambot::Commands::Session

Inherits:
Thor
  • Object
show all
Defined in:
lib/sambot/commands/session.rb

Constant Summary collapse

ApplicationError =
Sambot::Domain::Common::ApplicationError
Runtime =
Sambot::Domain::Common::Runtime

Instance Method Summary collapse

Instance Method Details

#startObject



12
13
14
15
16
17
18
19
20
# File 'lib/sambot/commands/session.rb', line 12

def start
  Runtime.ensure_latest
  username = ask(' What is your DEV/QE username i.e. jsmith? ')
  password = ask(' What is your DEV/QE password? ', :echo => false)
  say('')
  Domain::Session.start(username, password)
rescue ApplicationError => e
  error(e.message)
end

#stopObject



23
24
25
26
27
28
# File 'lib/sambot/commands/session.rb', line 23

def stop
  Runtime.ensure_latest
  Domain::Session.stop()
rescue ApplicationError => e
  error(e.message)
end