Class: ChefCLI::Policyfile::NullCookbookSource

Inherits:
Object
  • Object
show all
Defined in:
lib/chef-cli/policyfile/null_cookbook_source.rb

Instance Method Summary collapse

Constructor Details

#initialize(_uri = nil) ⇒ NullCookbookSource

Returns a new instance of NullCookbookSource.



24
# File 'lib/chef-cli/policyfile/null_cookbook_source.rb', line 24

def initialize(_uri = nil); end

Instance Method Details

#descObject



42
43
44
# File 'lib/chef-cli/policyfile/null_cookbook_source.rb', line 42

def desc
  "null_cookbook_source"
end

#null?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/chef-cli/policyfile/null_cookbook_source.rb', line 34

def null?
  true
end

#preferred_cookbooksObject



38
39
40
# File 'lib/chef-cli/policyfile/null_cookbook_source.rb', line 38

def preferred_cookbooks
  []
end

#source_options_for(cookbook_name, cookbook_version) ⇒ Object

Raises:



30
31
32
# File 'lib/chef-cli/policyfile/null_cookbook_source.rb', line 30

def source_options_for(cookbook_name, cookbook_version)
  raise UnsupportedFeature, "You must set a default_source in your Policyfile to download cookbooks without explicit sources"
end

#universe_graphObject



26
27
28
# File 'lib/chef-cli/policyfile/null_cookbook_source.rb', line 26

def universe_graph
  {}
end