Class: Dapp::Builder::Chef::Berksfile
- Inherits:
-
Object
- Object
- Dapp::Builder::Chef::Berksfile
- Defined in:
- lib/dapp/builder/chef/berksfile.rb
Overview
Berksfile
Defined Under Namespace
Classes: Parser
Instance Attribute Summary collapse
-
#local_cookbooks ⇒ Object
readonly
Returns the value of attribute local_cookbooks.
-
#path ⇒ Object
readonly
Parser.
Instance Method Summary collapse
- #add_local_cookbook_path(name, path) ⇒ Object
-
#initialize(home_path, path) ⇒ Berksfile
constructor
A new instance of Berksfile.
- #local_cookbook(name) ⇒ Object
- #local_cookbook?(name) ⇒ Boolean
Constructor Details
Instance Attribute Details
#local_cookbooks ⇒ Object (readonly)
Returns the value of attribute local_cookbooks.
28 29 30 |
# File 'lib/dapp/builder/chef/berksfile.rb', line 28 def local_cookbooks @local_cookbooks end |
#path ⇒ Object (readonly)
Parser
27 28 29 |
# File 'lib/dapp/builder/chef/berksfile.rb', line 27 def path @path end |
Instance Method Details
#add_local_cookbook_path(name, path) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/dapp/builder/chef/berksfile.rb', line 37 def add_local_cookbook_path(name, path) @local_cookbooks[name] = { name: name, path: @home_path.join(path) } end |
#local_cookbook(name) ⇒ Object
48 49 50 |
# File 'lib/dapp/builder/chef/berksfile.rb', line 48 def local_cookbook(name) local_cookbooks[name] end |
#local_cookbook?(name) ⇒ Boolean
44 45 46 |
# File 'lib/dapp/builder/chef/berksfile.rb', line 44 def local_cookbook?(name) local_cookbooks.key? name end |