Class: CobraCommander::Dependencies::Bundler::Package
- Inherits:
-
Object
- Object
- CobraCommander::Dependencies::Bundler::Package
- Defined in:
- lib/cobra_commander/dependencies/bundler/package.rb
Overview
Calculates ruby bundler dependencies
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(spec = nil, path: spec&.loaded_from, name: spec&.name, dependencies: spec&.dependencies) ⇒ Package
constructor
A new instance of Package.
Constructor Details
#initialize(spec = nil, path: spec&.loaded_from, name: spec&.name, dependencies: spec&.dependencies) ⇒ Package
Returns a new instance of Package.
9 10 11 12 13 14 |
# File 'lib/cobra_commander/dependencies/bundler/package.rb', line 9 def initialize(spec = nil, path: spec&.loaded_from, name: spec&.name, dependencies: spec&.dependencies) @spec = spec @path = path @name = name @dependencies = dependencies&.map(&:name) end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
7 8 9 |
# File 'lib/cobra_commander/dependencies/bundler/package.rb', line 7 def dependencies @dependencies end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/cobra_commander/dependencies/bundler/package.rb', line 7 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/cobra_commander/dependencies/bundler/package.rb', line 7 def path @path end |