Class: Releasinator::CopyFile

Inherits:
Object
  • Object
show all
Defined in:
lib/copy_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_file, target_name, target_dir) ⇒ CopyFile

Returns a new instance of CopyFile.



4
5
6
7
8
9
10
11
# File 'lib/copy_file.rb', line 4

def initialize(source_file, target_name, target_dir)
  @source_file = source_file # The source file or directory name, including directory.
  @source_file.freeze
  @target_name = target_name # The target file or directory name, excluding directory.
  @target_name.freeze
  @target_dir = target_dir # The target directory name.
  @target_dir.freeze
end

Instance Attribute Details

#source_fileObject (readonly)

Returns the value of attribute source_file.



3
4
5
# File 'lib/copy_file.rb', line 3

def source_file
  @source_file
end

#target_dirObject (readonly)

Returns the value of attribute target_dir.



3
4
5
# File 'lib/copy_file.rb', line 3

def target_dir
  @target_dir
end

#target_nameObject (readonly)

Returns the value of attribute target_name.



3
4
5
# File 'lib/copy_file.rb', line 3

def target_name
  @target_name
end