class ProximitySensorConstraint

Category: Sensors

Public Class Methods

new(h={}) click to toggle source
Calls superclass method Constraint::new
# File lib/ruby-macrodroid/constraints.rb, line 1355
def initialize(h={})

  options = {
    near: true
  }

  super(options.merge h)

end

Public Instance Methods

to_s(colour: false, indent: 0) click to toggle source
# File lib/ruby-macrodroid/constraints.rb, line 1365
def to_s(colour: false, indent: 0)
  'Proximity Sensor: ' + (@h[:near] ? 'Near' : 'Far')
end