Sha256: 8dd552ede599089924c0e8ada467307a7979c504381d9d3abcc155a0e2fde12e

Contents?: true

Size: 1.06 KB

Versions: 7

Compression:

Stored size: 1.06 KB

Contents

# The class serves as the parent for Trepan::CmdProcessor which is
# quite large and spans over several files. By declaring "initialize"
# below, we have a consistent initialization routine and many of the
# others don't need to define "initialize".

# Also, simple versions of the I/O routines make it possible
# to do testing without having to bring in the whole "Interface"
# and I/O routines that trepanning (and "main.rb") use.

# Note that via this file we can change 'class Trepan' to 'module
# Trepan' or vice versa. So this takes effect on all of the places
# which subclass this. They use class Trepan::CmdProcessor <
# Trepan::VirtualCmdProcessor rather than breaking this down into to
# parts as below.
class Trepan
  class VirtualCmdProcessor
    attr_reader :settings
    def initialize(core, settings={})
      @core            = core
      @settings        = settings
    end
    def errmsg(message)
      puts "Error: #{message}"
    end
    def msg(message)
      puts message
    end
    def section(message, opts={})
      puts "Section: #{message}"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
trepanning-2.15.35 processor/virtual.rb
trepanning-1.93.35 processor/virtual.rb
trepanning-2.15.33 processor/virtual.rb
trepanning-1.93.32 processor/virtual.rb
trepanning-0.1.6 processor/virtual.rb
trepanning-0.1.4 processor/virtual.rb
trepanning-0.1.3 processor/virtual.rb