Class: Torganiser::Arranger::Destination

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

Overview

Models a destination for an episode file in a collection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(collection, episode_file) ⇒ Destination

Returns a new instance of Destination.



43
44
45
46
# File 'lib/torganiser/arranger.rb', line 43

def initialize(collection, episode_file)
  @collection = collection
  @episode_file = episode_file
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



41
42
43
# File 'lib/torganiser/arranger.rb', line 41

def collection
  @collection
end

#episode_fileObject (readonly)

Returns the value of attribute episode_file.



41
42
43
# File 'lib/torganiser/arranger.rb', line 41

def episode_file
  @episode_file
end

Instance Method Details

#directoryObject



48
49
50
# File 'lib/torganiser/arranger.rb', line 48

def directory
  @directory ||= File.join(collection, series_dir, season_dir)
end