Class: CobraCommander::Dependencies::Yarn::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/cobra_commander/dependencies/yarn/package.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, dependencies:, name: nil) ⇒ Package

Returns a new instance of Package.



8
9
10
11
12
# File 'lib/cobra_commander/dependencies/yarn/package.rb', line 8

def initialize(path:, dependencies:, name: nil)
  @path = path
  @name = untag(name)
  @dependencies = dependencies.map { |dep| untag(dep) }
end

Instance Attribute Details

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



6
7
8
# File 'lib/cobra_commander/dependencies/yarn/package.rb', line 6

def dependencies
  @dependencies
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/cobra_commander/dependencies/yarn/package.rb', line 6

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/cobra_commander/dependencies/yarn/package.rb', line 6

def path
  @path
end