Class: RemoteDroid::Query
- Inherits:
-
Object
- Object
- RemoteDroid::Query
- Defined in:
- lib/remotedroid.rb
Instance Method Summary collapse
- #airplane_mode_enabled? ⇒ Boolean
- #battery ⇒ Object
- #cell_id ⇒ Object (also: #cell_tower)
- #current_brightness ⇒ Object (also: #brightness)
-
#initialize(callback) ⇒ Query
constructor
A new instance of Query.
- #ip ⇒ Object
- #location ⇒ Object
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
792 793 794 |
# File 'lib/remotedroid.rb', line 792 def airplane_mode_enabled?() q(:airplane_mode_on).to_i > 0 end |
#battery ⇒ Object
796 797 798 |
# File 'lib/remotedroid.rb', line 796 def battery() q(:battery).to_i end |
#cell_id ⇒ Object Also known as: cell_tower
806 807 808 |
# File 'lib/remotedroid.rb', line 806 def cell_id() q(:cell_id) end |
#current_brightness ⇒ Object Also known as: brightness
800 801 802 |
# File 'lib/remotedroid.rb', line 800 def current_brightness() q(:current_brightness).to_i end |
#ip ⇒ Object
812 813 814 |
# File 'lib/remotedroid.rb', line 812 def ip() q(:ip) end |
#location ⇒ Object
816 817 818 |
# File 'lib/remotedroid.rb', line 816 def location() @callback.query(:location)[:coords] end |