Class: EhbrsRubyUtils::Fs::Selected::Build
- Inherits:
-
Object
- Object
- EhbrsRubyUtils::Fs::Selected::Build
- Defined in:
- lib/ehbrs_ruby_utils/fs/selected/build.rb
Constant Summary collapse
- DEFAULT_TARGET_BASENAME_PROC =
proc { |path| path.basename.to_path }
Instance Attribute Summary collapse
-
#selected ⇒ Object
readonly
Returns the value of attribute selected.
-
#target_basename_proc ⇒ Object
readonly
Returns the value of attribute target_basename_proc.
-
#target_dir ⇒ Object
readonly
Returns the value of attribute target_dir.
Instance Method Summary collapse
-
#initialize(selected, target_dir, &target_basename_proc) ⇒ Build
constructor
A new instance of Build.
- #perform ⇒ Object
Constructor Details
#initialize(selected, target_dir, &target_basename_proc) ⇒ Build
Returns a new instance of Build.
14 15 16 17 18 |
# File 'lib/ehbrs_ruby_utils/fs/selected/build.rb', line 14 def initialize(selected, target_dir, &target_basename_proc) @selected = selected @target_dir = target_dir.to_pathname @target_basename_proc = target_basename_proc.presence || DEFAULT_TARGET_BASENAME_PROC end |
Instance Attribute Details
#selected ⇒ Object (readonly)
Returns the value of attribute selected.
12 13 14 |
# File 'lib/ehbrs_ruby_utils/fs/selected/build.rb', line 12 def selected @selected end |
#target_basename_proc ⇒ Object (readonly)
Returns the value of attribute target_basename_proc.
12 13 14 |
# File 'lib/ehbrs_ruby_utils/fs/selected/build.rb', line 12 def target_basename_proc @target_basename_proc end |
#target_dir ⇒ Object (readonly)
Returns the value of attribute target_dir.
12 13 14 |
# File 'lib/ehbrs_ruby_utils/fs/selected/build.rb', line 12 def target_dir @target_dir end |
Instance Method Details
#perform ⇒ Object
20 21 22 23 |
# File 'lib/ehbrs_ruby_utils/fs/selected/build.rb', line 20 def perform clear_target_dir link_selected_found end |