Class: Jars::GemspecArtifacts
- Inherits:
-
Object
- Object
- Jars::GemspecArtifacts
- Defined in:
- lib/jars/gemspec_artifacts.rb
Defined Under Namespace
Classes: Artifact, Exclusion, Exclusions
Instance Attribute Summary collapse
-
#artifacts ⇒ Object
readonly
Returns the value of attribute artifacts.
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(spec) ⇒ GemspecArtifacts
constructor
A new instance of GemspecArtifacts.
Constructor Details
permalink #initialize(spec) ⇒ GemspecArtifacts
Returns a new instance of GemspecArtifacts.
192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/jars/gemspec_artifacts.rb', line 192 def initialize( spec ) @artifacts = [] spec.requirements.each do |req| req.split( /\n/ ).each do |line| if ( a = Artifact.new( line ) ) @artifacts << a end end end @artifacts.freeze end |
Instance Attribute Details
permalink #artifacts ⇒ Object (readonly)
Returns the value of attribute artifacts.
190 191 192 |
# File 'lib/jars/gemspec_artifacts.rb', line 190 def artifacts @artifacts end |
Instance Method Details
permalink #[](index) ⇒ Object
[View source]
204 205 206 |
# File 'lib/jars/gemspec_artifacts.rb', line 204 def [](index) @artifacts[index] end |