Class: CmdLine::FileName
- Inherits:
-
Object
- Object
- CmdLine::FileName
- Defined in:
- lib/cmdline/filename.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(args) ⇒ FileName
constructor
A new instance of FileName.
- #to_s ⇒ Object
Constructor Details
#initialize(args) ⇒ FileName
Returns a new instance of FileName.
8 9 10 |
# File 'lib/cmdline/filename.rb', line 8 def initialize args @name = args.join('-').gsub('/', '_slash_') + '.gz' end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/cmdline/filename.rb', line 6 def name @name end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/cmdline/filename.rb', line 12 def to_s @name end |