Class: MovieOrganizer::FileCopier
- Inherits:
-
Object
- Object
- MovieOrganizer::FileCopier
- Defined in:
- lib/movie_organizer/file_copier.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#hostname ⇒ Object
readonly
Returns the value of attribute hostname.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#options ⇒ Object
Returns the value of attribute options.
-
#remote_filename ⇒ Object
readonly
Returns the value of attribute remote_filename.
-
#target_file ⇒ Object
Returns the value of attribute target_file.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #copy ⇒ Object
-
#initialize(filename, target_file, options) ⇒ FileCopier
constructor
A new instance of FileCopier.
Constructor Details
#initialize(filename, target_file, options) ⇒ FileCopier
8 9 10 11 12 13 |
# File 'lib/movie_organizer/file_copier.rb', line 8 def initialize(filename, target_file, ) @filename = filename @target_file = target_file = @logger = Logger.instance end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
5 6 7 |
# File 'lib/movie_organizer/file_copier.rb', line 5 def filename @filename end |
#hostname ⇒ Object (readonly)
Returns the value of attribute hostname.
6 7 8 |
# File 'lib/movie_organizer/file_copier.rb', line 6 def hostname @hostname end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/movie_organizer/file_copier.rb', line 6 def logger @logger end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/movie_organizer/file_copier.rb', line 5 def end |
#remote_filename ⇒ Object (readonly)
Returns the value of attribute remote_filename.
6 7 8 |
# File 'lib/movie_organizer/file_copier.rb', line 6 def remote_filename @remote_filename end |
#target_file ⇒ Object
Returns the value of attribute target_file.
5 6 7 |
# File 'lib/movie_organizer/file_copier.rb', line 5 def target_file @target_file end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
6 7 8 |
# File 'lib/movie_organizer/file_copier.rb', line 6 def username @username end |
Instance Method Details
#copy ⇒ Object
15 16 17 |
# File 'lib/movie_organizer/file_copier.rb', line 15 def copy ssh? ? remote_copy : local_copy end |