Class: FileRenamer::NameAlterer
- Inherits:
-
Object
- Object
- FileRenamer::NameAlterer
- Defined in:
- lib/name_alterer.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize ⇒ NameAlterer
constructor
A new instance of NameAlterer.
- #renamed_filename(args) ⇒ Object
Constructor Details
#initialize ⇒ NameAlterer
Returns a new instance of NameAlterer.
9 10 11 12 13 |
# File 'lib/name_alterer.rb', line 9 def initialize @filename @number @name end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
5 6 7 |
# File 'lib/name_alterer.rb', line 5 def filename @filename end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/name_alterer.rb', line 5 def name @name end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
5 6 7 |
# File 'lib/name_alterer.rb', line 5 def number @number end |
Instance Method Details
#renamed_filename(args) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/name_alterer.rb', line 15 def renamed_filename(args) @filename = args[:filename] @number = args[:number] @name = args[:new_name] name_with_extension end |