Class: Caterer::Config::Berkshelf

Inherits:
Object
  • Object
show all
Defined in:
lib/caterer/config/berkshelf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBerkshelf

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_pathString

Returns path to the Berksfile to use with Vagrant.

Returns:

  • (String)

    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

#exceptArray<Symbol>

Returns cookbooks in all other groups except for these will be installed and copied to Vagrant’s shelf.

Returns:

  • (Array<Symbol>)

    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

#onlyArray<Symbol>

Returns only cookbooks in these groups will be installed and copied to Vagrant’s shelf.

Returns:

  • (Array<Symbol>)

    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_hashObject



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