Class: Command::Cacheable::FileName

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ FileName

Returns a new instance of FileName.



13
14
15
# File 'lib/command/cacheable/filename.rb', line 13

def initialize args
  @name = args.join('-').gsub('/', '_slash_') + '.gz'
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/command/cacheable/filename.rb', line 11

def name
  @name
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/command/cacheable/filename.rb', line 17

def to_s
  @name
end