Class: Idb::AbstractDevice

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/abstract_device.rb

Direct Known Subclasses

Device, Simulator

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#apps_dirObject

Returns the value of attribute apps_dir.



3
4
5
# File 'lib/lib/abstract_device.rb', line 3

def apps_dir
  @apps_dir
end

#opsObject

Returns the value of attribute ops.



4
5
6
# File 'lib/lib/abstract_device.rb', line 4

def ops
  @ops
end

Instance Method Details

#app_uuidsObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/lib/abstract_device.rb', line 6

def app_uuids
  unless @ops.file_exists? @apps_dir
    puts "Application directory #{@apps_dir} not found."
    raise "Application directory #{@apps_dir} not found."
  end

  puts '[*] Retrieving list of applications...'

  dirs = @ops.list_dir @apps_dir.to_s
  dirs.select! { |x| (x != ".") && (x != "..") }

  if dirs.length.zero?
    puts "No applications found in #{@apps_dir}."
    raise "No applications found in #{@apps_dir}."
  end
  dirs
end

#closeObject



24
25
# File 'lib/lib/abstract_device.rb', line 24

def close
end