Class: Caterer::Config::Berkshelf
- Inherits:
-
Object
- Object
- Caterer::Config::Berkshelf
- Defined in:
- lib/caterer/config/berkshelf.rb
Instance Attribute Summary collapse
-
#berksfile_path ⇒ String
Path to the Berksfile to use with Vagrant.
-
#except ⇒ Array<Symbol>
Cookbooks in all other groups except for these will be installed and copied to Vagrant’s shelf.
-
#only ⇒ Array<Symbol>
Only cookbooks in these groups will be installed and copied to Vagrant’s shelf.
Instance Method Summary collapse
-
#initialize ⇒ Berkshelf
constructor
A new instance of Berkshelf.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Berkshelf
Returns a new instance of Berkshelf.
19 20 21 22 23 |
# File 'lib/caterer/config/berkshelf.rb', line 19 def initialize @berksfile_path = File.join(Dir.pwd, ::Berkshelf::DEFAULT_FILENAME) @except = [] @only = [] end |
Instance Attribute Details
#berksfile_path ⇒ String
Returns path to the Berksfile to use with Vagrant.
7 8 9 |
# File 'lib/caterer/config/berkshelf.rb', line 7 def berksfile_path @berksfile_path end |
#except ⇒ Array<Symbol>
Returns cookbooks in all other groups except for these will be installed and copied to Vagrant’s shelf.
17 18 19 |
# File 'lib/caterer/config/berkshelf.rb', line 17 def except @except end |
#only ⇒ Array<Symbol>
Returns only cookbooks in these groups will be installed and copied to Vagrant’s shelf.
12 13 14 |
# File 'lib/caterer/config/berkshelf.rb', line 12 def only @only end |
Instance Method Details
#to_hash ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/caterer/config/berkshelf.rb', line 30 def to_hash { :berksfile_path => @berksfile_path, :only => @only, :except => @except } end |