Class: GemContribute::LockedGem
- Inherits:
-
Data
- Object
- Data
- GemContribute::LockedGem
- Defined in:
- lib/gem_contribute/locked_gem.rb
Overview
A single dependency parsed from Gemfile.lock.
The design doc calls this “a Gem”; the in-code name is LockedGem to avoid shadowing Ruby’s stdlib ::Gem inside the GemContribute namespace. See ADR-0009.
‘source_type` is one of:
:rubygems — published to a RubyGems-compatible index
:git — `gem 'foo', git: '…'`
:path — `gem 'foo', path: '…'`
:bundler — Bundler itself (only present in lockfiles via DEPENDENCIES)
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source_type ⇒ Object
readonly
Returns the value of attribute source_type.
-
#source_uri ⇒ Object
readonly
Returns the value of attribute source_uri.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name
15 16 17 |
# File 'lib/gem_contribute/locked_gem.rb', line 15 def name @name end |
#source_type ⇒ Object (readonly)
Returns the value of attribute source_type
15 16 17 |
# File 'lib/gem_contribute/locked_gem.rb', line 15 def source_type @source_type end |
#source_uri ⇒ Object (readonly)
Returns the value of attribute source_uri
15 16 17 |
# File 'lib/gem_contribute/locked_gem.rb', line 15 def source_uri @source_uri end |
#version ⇒ Object (readonly)
Returns the value of attribute version
15 16 17 |
# File 'lib/gem_contribute/locked_gem.rb', line 15 def version @version end |
Instance Method Details
#resolvable? ⇒ Boolean
20 21 22 23 24 |
# File 'lib/gem_contribute/locked_gem.rb', line 20 def resolvable? # We can only ask the RubyGems API about things we got from RubyGems. # See ADR-0003 for what we do with the answer. rubygems? end |
#rubygems? ⇒ Boolean
16 17 18 |
# File 'lib/gem_contribute/locked_gem.rb', line 16 def rubygems? source_type == :rubygems end |