Class: Menagerie::Artifact
- Inherits:
-
Object
- Object
- Menagerie::Artifact
- Defined in:
- lib/menagerie/artifact.rb
Overview
Artifacts are a stored file for a particular version of a project
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Artifact
constructor
A new instance of Artifact.
- #path ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Artifact
Returns a new instance of Artifact.
9 10 11 12 13 |
# File 'lib/menagerie/artifact.rb', line 9 def initialize(params = {}) @options = params @logger = @options[:logger] || Menagerie.get_logger @options[:artifact] ? create : parse end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/menagerie/artifact.rb', line 7 def name @name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
7 8 9 |
# File 'lib/menagerie/artifact.rb', line 7 def version @version end |
Instance Method Details
#path ⇒ Object
15 16 17 |
# File 'lib/menagerie/artifact.rb', line 15 def path @path ||= "#{@options[:paths][:artifacts]}/#{@name}/#{@version}" end |