class FileOperationV21Action
Category: Files
Public Class Methods
new(h={})
click to toggle source
Calls superclass method
FileAction::new
# File lib/ruby-macrodroid/actions.rb, line 1586 def initialize(h={}) options = { :app_name=>"", :class_name=>"", :package_name=>"", :file_path=>"", :file_extensions=>["jpg", "jpeg", "png", "raw", "bmp", "tif", "tiff", "gif"], :file_option=>2, :from_name=>"Sent", :from_uri_string=>"", :option=>2 } super(options.merge h) end
Public Instance Methods
to_s(colour: false, indent: 0)
click to toggle source
Calls superclass method
MacroObject#to_s
# File lib/ruby-macrodroid/actions.rb, line 1599 def to_s(colour: false, indent: 0) operation = ['Copy', 'Move', 'Delete', 'Create Folder'] file = ['All Files', 'All Media Files', 'Images', 'Audio', 'Videos', 'Specify File Pattern', 'Folder'] detail = @h[:from_name] detail += ' to: ' + @h[:to_name] if @h[:option] == 1 @s = "%s %s" % [operation[@h[:option]], file[@h[:file_option]]] \ + "\n" + detail #+ @h.inspect super() end
Also aliased as: to_summary