Class: KnifeCookbookDependencies::MetaCookbook

Inherits:
Object
  • Object
show all
Defined in:
lib/kcd/metacookbook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, dependencies) ⇒ MetaCookbook

Returns a new instance of MetaCookbook.



5
6
7
8
# File 'lib/kcd/metacookbook.rb', line 5

def initialize(name, dependencies)
  @name = name
  @dependencies = dependencies
end

Instance Attribute Details

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



3
4
5
# File 'lib/kcd/metacookbook.rb', line 3

def dependencies
  @dependencies
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/kcd/metacookbook.rb', line 3

def name
  @name
end

Instance Method Details

#latest_constrained_versionObject



14
15
16
# File 'lib/kcd/metacookbook.rb', line 14

def latest_constrained_version
  versions.first
end

#versionsObject



10
11
12
# File 'lib/kcd/metacookbook.rb', line 10

def versions
  @v ||= [DepSelector::Version.new('1.0.0')]
end