Class: VagrantPlugins::ChefZero::Env

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-chef-zero/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.



12
13
14
15
16
17
18
19
20
# File 'lib/vagrant-chef-zero/env.rb', line 12

def initialize
  vagrant_version = Gem::Version.new(::Vagrant::VERSION)
  if vagrant_version >= Gem::Version.new("1.5")
    @ui = ::Vagrant::UI::Colored.new
    @ui.opts[:target] = 'Butcher'
  elsif vagrant_version >= Gem::Version.new("1.2")
    @ui = ::Vagrant::UI::Colored.new.scope('Chef Zero')
  end
end

Instance Attribute Details

#serverChefZero::Server

Returns:

  • (ChefZero::Server)


10
11
12
# File 'lib/vagrant-chef-zero/env.rb', line 10

def server
  @server
end

#uiVagrant::UI::Colored

Returns:

  • (Vagrant::UI::Colored)


8
9
10
# File 'lib/vagrant-chef-zero/env.rb', line 8

def ui
  @ui
end