Class: Avm::Files::Rotate
- Inherits:
-
Object
- Object
- Avm::Files::Rotate
- Includes:
- EacRubyUtils::SimpleCache
- Defined in:
- lib/avm/files/rotate.rb
Instance Attribute Summary collapse
-
#source_path ⇒ Object
readonly
Returns the value of attribute source_path.
Instance Method Summary collapse
-
#initialize(source_path) ⇒ Rotate
constructor
A new instance of Rotate.
- #run ⇒ Object
Constructor Details
#initialize(source_path) ⇒ Rotate
Returns a new instance of Rotate.
13 14 15 |
# File 'lib/avm/files/rotate.rb', line 13 def initialize(source_path) @source_path = source_path end |
Instance Attribute Details
#source_path ⇒ Object (readonly)
Returns the value of attribute source_path.
11 12 13 |
# File 'lib/avm/files/rotate.rb', line 11 def source_path @source_path end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/avm/files/rotate.rb', line 17 def run validate_msg = validate return validate_msg if validate_msg.present? ::FileUtils.mv(source_path, target_path) nil end |