Class: VolumeConstraint

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

Returns a new instance of VolumeConstraint.



4915
4916
4917
4918
4919
4920
4921
4922
4923
# File 'lib/ruby-macrodroid.rb', line 4915

def initialize(h={})

  options = {
    option: 0
  }

  super(options.merge filter(options, h))

end

Instance Method Details

#to_sObject



4925
4926
4927
4928
4929
# File 'lib/ruby-macrodroid.rb', line 4925

def to_s()
  a = ['Volume On', 'Vibrate Only' 'Silent', 'Vibrate or Silent']
  
  "Ringer Volume\n  " + a[@h[:option]]
end