Class: WriteToFileAction

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

Overview

Category: Files

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

Returns a new instance of WriteToFileAction.



1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
# File 'lib/ruby-macrodroid/actions.rb', line 1166

def initialize(h={})

  options = {
    app_name: '',
    class_name: '',
    package_name: '',
    file_path: ''
  }

  super(options.merge h)

end

Instance Method Details

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



1179
1180
1181
# File 'lib/ruby-macrodroid/actions.rb', line 1179

def to_s(colour: false)
  'Write To File' + "\n  " + @h[:filename] #+ @h.inspect
end