Class: VolumeLevelConstraint

Inherits:
Constraint show all
Defined in:
lib/ruby-macrodroid/constraints.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 = {}) ⇒ VolumeLevelConstraint

Returns a new instance of VolumeLevelConstraint.



1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
# File 'lib/ruby-macrodroid/constraints.rb', line 1248

def initialize(h={})

  options = {
    comparison: 0,
    stream_index_array: [false, true, false, false, false, false, false],
    volume: 42
  }

  super(options.merge h)

end

Instance Method Details

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



1260
1261
1262
# File 'lib/ruby-macrodroid/constraints.rb', line 1260

def to_s(colour: false, indent: 0)
  'VolumeLevelConstraint ' + @h.inspect
end