Class: Berkshelf::Vagrant::Env

Inherits:
Object
  • Object
show all
Defined in:
lib/berkshelf/vagrant/env.rb

Overview

Environment data to build up and persist through the middleware chain

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEnv

Returns a new instance of Env.



16
17
18
19
20
21
22
23
# File 'lib/berkshelf/vagrant/env.rb', line 16

def initialize
  if Gem::Version.new(::Vagrant::VERSION) >= Gem::Version.new("1.2")
    @ui     = ::Vagrant::UI::Colored.new.scope('Berkshelf')
  else
    @ui     = ::Vagrant::UI::Colored.new('Berkshelf')
  end
  @config = Berkshelf::Config.instance
end

Instance Attribute Details

#berksfileBerkshelf::Berksfile

Returns:

  • (Berkshelf::Berksfile)


10
11
12
# File 'lib/berkshelf/vagrant/env.rb', line 10

def berksfile
  @berksfile
end

#configBerkshelf::Config

Returns:

  • (Berkshelf::Config)


14
15
16
# File 'lib/berkshelf/vagrant/env.rb', line 14

def config
  @config
end

#shelfString

Returns:

  • (String)


12
13
14
# File 'lib/berkshelf/vagrant/env.rb', line 12

def shelf
  @shelf
end

#uiVagrant::UI::Colored

Returns:

  • (Vagrant::UI::Colored)


8
9
10
# File 'lib/berkshelf/vagrant/env.rb', line 8

def ui
  @ui
end