Class: PlaySoundAction

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

Overview

Category: Media

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

Returns a new instance of PlaySoundAction.



3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
# File 'lib/ruby-macrodroid.rb', line 3081

def initialize(h={})

  options = {
    selected_index: 0,
    file_path: ''
  }

  super(options.merge h)

end

Instance Method Details

#to_s ⇒ Object



3092
3093
3094
# File 'lib/ruby-macrodroid.rb', line 3092

def to_s()
  'Play: ' + @h[:file_path]
end