Class: Vagrant::UI::NonInteractive

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

Instance Attribute Summary

Attributes inherited from Interface

#opts, #stderr, #stdin, #stdout

Instance Method Summary collapse

Methods inherited from Basic

#format_message, #say

Methods included from Vagrant::Util::SafePuts

#safe_puts

Methods inherited from Interface

#color?, inherited, #initialize_copy, #machine, #to_proto

Constructor Details

#initializeNonInteractive

Returns a new instance of NonInteractive.



272
273
274
# File 'lib/vagrant/ui.rb', line 272

def initialize
  super
end

Instance Method Details

#ask(*args, **opts) ⇒ Object



289
290
291
292
# File 'lib/vagrant/ui.rb', line 289

def ask(*args, **opts)
  # Non interactive can't ask for input
  raise Errors::UIExpectsTTY
end

#clear_lineObject



284
285
286
287
# File 'lib/vagrant/ui.rb', line 284

def clear_line
  @logger.warn("Using `clear line` in a non interactive ui")
  say(:info, "\n", opts)
end

#report_progress(progress, total, show_parts = true) ⇒ Object



280
281
282
# File 'lib/vagrant/ui.rb', line 280

def report_progress(progress, total, show_parts=true)
  # no-op
end

#rewritingObject



276
277
278
# File 'lib/vagrant/ui.rb', line 276

def rewriting
  # no-op
end