Class: DeviceLockedConstraint

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

Overview

Category: Device State

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Constraint

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ DeviceLockedConstraint

Returns a new instance of DeviceLockedConstraint.



4572
4573
4574
4575
4576
4577
4578
4579
4580
# File 'lib/ruby-macrodroid.rb', line 4572

def initialize(h={})

  options = {
    locked: true
  }

  super(options.merge h)

end

Instance Method Details

#to_sObject



4582
4583
4584
# File 'lib/ruby-macrodroid.rb', line 4582

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