Class: DeviceLockedConstraint

Inherits:
Constraint show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: Device State

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #type

Instance Method Summary collapse

Methods inherited from Constraint

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ DeviceLockedConstraint



4432
4433
4434
4435
4436
4437
4438
4439
4440
# File 'lib/ruby-macrodroid.rb', line 4432

def initialize(h={})

  options = {
    locked: true
  }

  super(options.merge h)

end

Instance Method Details

#to_sObject



4442
4443
4444
# File 'lib/ruby-macrodroid.rb', line 4442

def to_s()
  'Device ' + (@h[:locked] ? 'Locked' : 'Unlocked')
end