class ScreenOnOffTrigger

Category: Device Events

Public Class Methods

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

  options = {
    screen_on: true
  }

  super(options.merge h)

end

Public Instance Methods

match?(detail={}, model=nil) click to toggle source
# File lib/ruby-macrodroid/triggers.rb, line 1226
def match?(detail={}, model=nil)
  #@h[:screen_on] == detail[:screen_on]
  true
end
to_s(colour: false) click to toggle source
# File lib/ruby-macrodroid/triggers.rb, line 1231
def to_s(colour: false)
  'Screen ' + (@h[:screen_on] ? 'On' : 'Off')
end
Also aliased as: to_summary
to_summary(colour: false)
Alias for: to_s