Class: Berkshelf::Vagrant::Env
- Inherits:
-
Object
- Object
- Berkshelf::Vagrant::Env
- Defined in:
- lib/berkshelf/vagrant/env.rb
Overview
Environment data to build up and persist through the middleware chain
Instance Attribute Summary collapse
- #berksfile ⇒ Berkshelf::Berksfile
- #config ⇒ Berkshelf::Config
- #shelf ⇒ String
- #ui ⇒ Vagrant::UI::Colored
Instance Method Summary collapse
-
#initialize ⇒ Env
constructor
A new instance of Env.
Constructor Details
#initialize ⇒ Env
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
#berksfile ⇒ Berkshelf::Berksfile
10 11 12 |
# File 'lib/berkshelf/vagrant/env.rb', line 10 def berksfile @berksfile end |
#config ⇒ Berkshelf::Config
14 15 16 |
# File 'lib/berkshelf/vagrant/env.rb', line 14 def config @config end |
#shelf ⇒ String
12 13 14 |
# File 'lib/berkshelf/vagrant/env.rb', line 12 def shelf @shelf end |
#ui ⇒ Vagrant::UI::Colored
8 9 10 |
# File 'lib/berkshelf/vagrant/env.rb', line 8 def ui @ui end |