Class: Phonehome::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/phonehome/cli.rb

Instance Method Summary collapse

Instance Method Details

#callObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/phonehome/cli.rb', line 9

def call()
  cmd = options[:cmd]
  access_token = options[:access_token]
  event_id = options[:event_id]

  puts "cmd:#{cmd}"
  puts "access_token:#{access_token}"
  puts "event_id:#{event_id}"

  puts "STARTING PHONEHOME CALL"
  puts "running:#{cmd}"
  
  result = Phonehome.call(access_token, event_id) do
    `#{cmd}`
  end

  puts "result:#{result}"
  puts "DONE PHONEHOME CALL"
  result
end