Class: CmdLine::FileName

Inherits:
Object
  • Object
show all
Defined in:
lib/cmdline/filename.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (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_sObject



12
13
14
# File 'lib/cmdline/filename.rb', line 12

def to_s
  @name
end