Class: Vagrant::Butcher::Env
- Inherits:
-
Object
- Object
- Vagrant::Butcher::Env
- Defined in:
- lib/vagrant-butcher/env.rb
Instance Attribute Summary collapse
-
#ui ⇒ Object
Returns the value of attribute ui.
Instance Method Summary collapse
-
#initialize ⇒ Env
constructor
A new instance of Env.
Constructor Details
#initialize ⇒ Env
Returns a new instance of Env.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vagrant-butcher/env.rb', line 6 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('Butcher') else @ui = ::Vagrant::UI::Colored.new('Butcher') end end |
Instance Attribute Details
#ui ⇒ Object
Returns the value of attribute ui.
4 5 6 |
# File 'lib/vagrant-butcher/env.rb', line 4 def ui @ui end |