Class: Restauration::Fichier
- Inherits:
-
Object
- Object
- Restauration::Fichier
- Defined in:
- lib/images/restauration/fichier.rb
Overview
Fichier
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#extension ⇒ Object
readonly
Returns the value of attribute extension.
-
#nom_attribue ⇒ Object
readonly
Returns the value of attribute nom_attribue.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(nom_attribue, date, path, extension) ⇒ Fichier
constructor
A new instance of Fichier.
- #path_destination ⇒ Object
- #path_nouveau_nom ⇒ Object
Constructor Details
#initialize(nom_attribue, date, path, extension) ⇒ Fichier
Returns a new instance of Fichier.
12 13 14 15 16 17 18 |
# File 'lib/images/restauration/fichier.rb', line 12 def initialize(nom_attribue, date, path, extension) @nom_attribue = nom_attribue @date = date @path = path @extension = extension @type = Classification.get_type(extension) end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
10 11 12 |
# File 'lib/images/restauration/fichier.rb', line 10 def date @date end |
#extension ⇒ Object (readonly)
Returns the value of attribute extension.
10 11 12 |
# File 'lib/images/restauration/fichier.rb', line 10 def extension @extension end |
#nom_attribue ⇒ Object (readonly)
Returns the value of attribute nom_attribue.
10 11 12 |
# File 'lib/images/restauration/fichier.rb', line 10 def nom_attribue @nom_attribue end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
10 11 12 |
# File 'lib/images/restauration/fichier.rb', line 10 def path @path end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
10 11 12 |
# File 'lib/images/restauration/fichier.rb', line 10 def type @type end |
Instance Method Details
#path_destination ⇒ Object
24 25 26 |
# File 'lib/images/restauration/fichier.rb', line 24 def path_destination "#{@path}/#{DirectoryHelpers.defini_dossier_par(@extension)}/#{@nom_attribue}#{@extension.downcase}" end |
#path_nouveau_nom ⇒ Object
20 21 22 |
# File 'lib/images/restauration/fichier.rb', line 20 def path_nouveau_nom "#{@path}/#{@nom_attribue}#{@extension.downcase}" end |