Class: RemoteDroid::Query

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

Instance Method Summary collapse

Constructor Details

#initialize(callback) ⇒ Query

Returns a new instance of Query.



788
789
790
# File 'lib/remotedroid.rb', line 788

def initialize(callback)
  @callback = callback
end

Instance Method Details

#airplane_mode_enabled?Boolean

Returns:

  • (Boolean)


792
793
794
# File 'lib/remotedroid.rb', line 792

def airplane_mode_enabled?()
  q(:airplane_mode_on).to_i > 0 
end

#batteryObject



796
797
798
# File 'lib/remotedroid.rb', line 796

def battery()      
  q(:battery).to_i
end

#cell_idObject Also known as: cell_tower



806
807
808
# File 'lib/remotedroid.rb', line 806

def cell_id()      
  q(:cell_id)
end

#current_brightnessObject Also known as: brightness



800
801
802
# File 'lib/remotedroid.rb', line 800

def current_brightness()      
  q(:current_brightness).to_i
end

#ipObject



812
813
814
# File 'lib/remotedroid.rb', line 812

def ip()      
  q(:ip)
end

#locationObject



816
817
818
# File 'lib/remotedroid.rb', line 816

def location()      
  @callback.query(:location)[:coords]
end