Class: Vagrant::UI::Interface

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

Overview

Vagrant UIs handle communication with the outside world (typically through a shell). They must respond to the following methods:

  • ‘info`

  • ‘warn`

  • ‘error`

  • ‘success`

Direct Known Subclasses

Basic, BasicScope, Silent

Instance Method Summary collapse

Constructor Details

#initializeInterface

Returns a new instance of Interface.



18
19
20
# File 'lib/vagrant/ui.rb', line 18

def initialize
  @logger   = Log4r::Logger.new("vagrant::ui::interface")
end

Instance Method Details

#scope(scope_name) ⇒ Interface

Returns a new UI class that is scoped to the given resource name. Subclasses can then use this scope name to do whatever they please.

Parameters:

  • scope_name (String)

Returns:



39
40
41
# File 'lib/vagrant/ui.rb', line 39

def scope(scope_name)
  self
end