Class: Bookbinder::Deploy::Artifact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Artifact.



6
7
8
9
10
11
# File 'lib/bookbinder/deploy/artifact.rb', line 6

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

Instance Attribute Details

#namespaceObject (readonly)

Returns the value of attribute namespace.



4
5
6
# File 'lib/bookbinder/deploy/artifact.rb', line 4

def namespace
  @namespace
end

Instance Method Details

#filenameObject



17
18
19
# File 'lib/bookbinder/deploy/artifact.rb', line 17

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

#full_pathObject



13
14
15
# File 'lib/bookbinder/deploy/artifact.rb', line 13

def full_path
  File.join(path, filename)
end