Class: Nocode::Steps::Io::Delete
- Inherits:
-
Nocode::Step
- Object
- Nocode::Step
- Nocode::Steps::Io::Delete
- Defined in:
- lib/nocode/steps/io/delete.rb
Overview
Delete the specified path. Does nothing if the file does not exist.
Constant Summary
Constants included from Util::Optionable
Util::Optionable::OPTION_PREFIX
Instance Attribute Summary
Attributes inherited from Nocode::Step
#context, #name, #options, #type
Instance Method Summary collapse
Methods inherited from Nocode::Step
Methods included from Util::Optionable
included, #method_missing, #options, #respond_to_missing?
Methods included from Util::Arrayable
Constructor Details
This class inherits a constructor from Nocode::Step
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Nocode::Util::Optionable
Instance Method Details
#perform ⇒ Object
10 11 12 13 14 |
# File 'lib/nocode/steps/io/delete.rb', line 10 def perform return if path.to_s.empty? FileUtils.rm_f(path) if File.exist?(path) end |