Class: Bookbinder::ArtifactNamer

Inherits:
Object
  • Object
show all
Defined in:
lib/bookbinder/artifact_namer.rb

Instance Method Summary collapse

Constructor Details

#initialize(namespace, build_number, extension, path = '.') ⇒ ArtifactNamer

Returns a new instance of ArtifactNamer.



3
4
5
6
7
8
# File 'lib/bookbinder/artifact_namer.rb', line 3

def initialize(namespace, build_number, extension, path = '.')
  @namespace = namespace
  @build_number = build_number
  @path = path
  @extension = extension
end

Instance Method Details

#filenameObject



14
15
16
# File 'lib/bookbinder/artifact_namer.rb', line 14

def filename
  "#{namespace}-#{build_number}.#{extension}"
end

#full_pathObject



10
11
12
# File 'lib/bookbinder/artifact_namer.rb', line 10

def full_path
  File.join(path, filename)
end