Class: EhbrsRubyUtils::Vg::Nds::Organizer::BaseFile
- Inherits:
-
Object
- Object
- EhbrsRubyUtils::Vg::Nds::Organizer::BaseFile
show all
- Defined in:
- lib/ehbrs_ruby_utils/vg/nds/organizer/base_file.rb
Instance Method Summary
collapse
Instance Method Details
#change? ⇒ Boolean
19
20
21
|
# File 'lib/ehbrs_ruby_utils/vg/nds/organizer/base_file.rb', line 19
def change?
source_path != target_path
end
|
#id ⇒ Object
23
24
25
|
# File 'lib/ehbrs_ruby_utils/vg/nds/organizer/base_file.rb', line 23
def id
source_path.basename_noext.to_path
end
|
27
28
29
30
31
|
# File 'lib/ehbrs_ruby_utils/vg/nds/organizer/base_file.rb', line 27
def perform
return unless change?
::FileUtils.mv(source_path, target_path.assert_parent)
end
|
#show ⇒ Object
33
34
35
|
# File 'lib/ehbrs_ruby_utils/vg/nds/organizer/base_file.rb', line 33
def show
puts "#{format_path(target_path, :green)} <= #{format_path(source_path, :yellow)}"
end
|