Class: BrightnessConstraint

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

Overview

Category: Screen and Speaker

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 = {}) ⇒ BrightnessConstraint

Returns a new instance of BrightnessConstraint.



5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
# File 'lib/ruby-macrodroid.rb', line 5702

def initialize(h={})

  options = {
    brightness: 35,
    equals: false,
    force_pie_mode: false,
    greater_than: false,
    is_auto_brightness: false
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object Also known as: to_summary



5716
5717
5718
# File 'lib/ruby-macrodroid.rb', line 5716

def to_s(colour: false)
  'BrightnessConstraint ' + @h.inspect
end