Class: CobraCommander::Package

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/cobra_commander/package.rb

Overview

A package within the

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Package.



14
15
16
17
18
19
# File 'lib/cobra_commander/package.rb', line 14

def initialize(source, path:, dependencies:, name:)
  @source = source
  @path = path
  @name = name
  @dependencies = dependencies
end

Instance Attribute Details

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



10
11
12
# File 'lib/cobra_commander/package.rb', line 10

def dependencies
  @dependencies
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/cobra_commander/package.rb', line 10

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



10
11
12
# File 'lib/cobra_commander/package.rb', line 10

def path
  @path
end

#sourceObject (readonly)

Returns the value of attribute source.



10
11
12
# File 'lib/cobra_commander/package.rb', line 10

def source
  @source
end

Instance Method Details

#describeObject



21
22
23
# File 'lib/cobra_commander/package.rb', line 21

def describe
  "#{name} (#{key})"
end