Class: SpeakTextAction

Inherits:
DeviceAction show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: Device Actions

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #type

Instance Method Summary collapse

Methods inherited from Action

#invoke

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ SpeakTextAction

Returns a new instance of SpeakTextAction.



2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
# File 'lib/ruby-macrodroid.rb', line 2732

def initialize(h={})

  options = {
    text_to_say: '',
    queue: false,
    read_numbers_individually: false,
    specify_audio_stream: false,
    speed: 0.99,
    pitch: 0.99,
    wait_to_finish: false,
    audio_stream: 0
  }

  super(options.merge h)

end

Instance Method Details

#to_sObject



2749
2750
2751
# File 'lib/ruby-macrodroid.rb', line 2749

def to_s()
  "Speak Text (%s)" % @h[:text_to_say]
end