Class: SpeakTextAction

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

Overview

Category: Device Actions

Instance Attribute Summary

Attributes inherited from Action

#constraints

Attributes inherited from MacroObject

#options, #siguid, #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.



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/ruby-macrodroid/actions.rb', line 770

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_s(colour: false) ⇒ Object



787
788
789
# File 'lib/ruby-macrodroid/actions.rb', line 787

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