Class: Dapp::Dimg::Builder::Chef::CookbookMetadata::FromConfBuilder
- Inherits:
-
Builder
- Object
- Builder
- Dapp::Dimg::Builder::Chef::CookbookMetadata::FromConfBuilder
- Defined in:
- lib/dapp/dimg/builder/chef/cookbook_metadata.rb
Overview
FromFileBuilder
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(metadata, name, version, cookbooks) ⇒ FromConfBuilder
constructor
A new instance of FromConfBuilder.
Methods inherited from Builder
#depends, #method_missing, #name, #version
Constructor Details
#initialize(metadata, name, version, cookbooks) ⇒ FromConfBuilder
Returns a new instance of FromConfBuilder.
84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/dapp/dimg/builder/chef/cookbook_metadata.rb', line 84 def initialize(, name, version, cookbooks) super() @cookbooks = cookbooks @cookbooks.each do |cname, desc| depends(cname, desc[:version_constraint], **desc) end self.name name self.version version end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Dapp::Dimg::Builder::Chef::CookbookMetadata::Builder
Instance Method Details
#dump ⇒ Object
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/dapp/dimg/builder/chef/cookbook_metadata.rb', line 97 def dump [].tap do |lines| lines << "name #{@metadata.name.inspect}\n" lines << "version #{@metadata.version.inspect}\n" @cookbooks.keys.each do |cookbook| lines << "depends #{cookbook.inspect}\n" unless cookbook.start_with? 'dimod-' end end.join end |