Sha256: 8b5fb6c894611ca92978656527aec0d529854a525be2066180bcfabf77b07045

Contents?: true

Size: 1.15 KB

Versions: 10

Compression:

Stored size: 1.15 KB

Contents

# -*- coding: binary -*-
require 'rex/ui'

module Rex
module Ui

###
#
# This class acts as a generic base class for outputing data.  It
# only provides stubs for the simplest form of outputing information.
#
###
class Output

  # General output
  require 'rex/ui/output/none'

  # Text-based output
  require 'rex/ui/text/output'

  #
  # Prints an error message.
  #
  def print_error(msg='')
  end

  #
  # Prints a 'good' message.
  #
  def print_good(msg='')
  end

  def print_debug(msg='')
  end

  #
  # Prints a status line.
  #
  def print_status(msg='')
  end

  #
  # Prints an undecorated line of information.
  #
  def print_line(msg='')
  end

  #
  # Prints a warning
  #
  def print_warning(msg='')
  end

  #
  # Prints a message with no decoration.
  #
  def print(msg='')
  end

  #
  # Flushes any buffered output.
  #
  def flush
  end

  #
  # Called to tell the output medium that we're at a prompt.
  # This is used to allow the output medium to display an extra
  # carriage return
  #
  def prompting(v = true)
    @at_prompt = v
  end

  #
  # Returns whether or not we're at a prompt currently
  #
  def prompting?
    @at_prompt
  end

end

end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
rex-2.0.8 lib/rex/ui/output.rb
rex-2.0.7 lib/rex/ui/output.rb
rex-2.0.5 lib/rex/ui/output.rb
rex-2.0.4 lib/rex/ui/output.rb
dstruct-0.0.1 lib/rex/ui/output.rb
rex-2.0.3 lib/rex/ui/output.rb
librex-0.0.999 lib/rex/ui/output.rb
rex-2.0.2 lib/rex/ui/output.rb
librex-0.0.71 lib/rex/ui/output.rb
librex-0.0.70 lib/rex/ui/output.rb