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.



5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
# File 'lib/ruby-macrodroid.rb', line 5716

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



5730
5731
5732
# File 'lib/ruby-macrodroid.rb', line 5730

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