Class: SetVolumeAction
- Inherits:
- 
      VolumeAction
      
        - Object
- MacroObject
- Action
- VolumeAction
- SetVolumeAction
 
- Defined in:
- lib/ruby-macrodroid/actions.rb
Overview
Category: Volume
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
- 
  
    
      #initialize(h = {})  ⇒ SetVolumeAction 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of SetVolumeAction. 
- #to_s(colour: false, indent: 0) ⇒ Object
Methods inherited from Action
Methods included from ObjectX
#action_to_object, #object_create, #varify
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetVolumeAction
| 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 | # File 'lib/ruby-macrodroid/actions.rb', line 2784 def initialize(h={}) = { variables: [nil, nil, nil, nil, nil, nil, nil], stream_index_array: [false, false, false, false, false, false, true], stream_volume_array: [0, 0, 0, 0, 0, 0, 66], force_vibrate_off: false, volume: -1 } super(.merge h) end | 
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object
| 2798 2799 2800 2801 | # File 'lib/ruby-macrodroid/actions.rb', line 2798 def to_s(colour: false, indent: 0) volume = @h[:stream_index_array].zip(@h[:stream_volume_array]).to_h[true] 'Volume Change ' + "Notification = %s%%" % volume end |