Class: DimScreenAction

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

Returns a new instance of DimScreenAction.



1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
# File 'lib/ruby-macrodroid/actions.rb', line 1835

def initialize(h={})

  options = {
    percent: 50,
    dim_screen_on: true
  }

  super(options.merge h)

end

Instance Method Details

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



1846
1847
1848
# File 'lib/ruby-macrodroid/actions.rb', line 1846

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