Class: SetBrightnessAction

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

Overview

Category: Screen

Instance Attribute Summary

Attributes inherited from Action

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Action

#invoke

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ SetBrightnessAction

Returns a new instance of SetBrightnessAction.



2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
# File 'lib/ruby-macrodroid/actions.rb', line 2045

def initialize(h={})

  options = {
    brightness_percent: 81,
    force_pie_mode: false,
    brightness: 0
  }

  super(options.merge h)

end

Instance Method Details

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



2057
2058
2059
# File 'lib/ruby-macrodroid/actions.rb', line 2057

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