class PpmToGdl::PpmToGdlController

Attributes

customer[R]
destPath[R]
srcPath[R]
verbose[R]

Public Class Methods

new() click to toggle source
# File lib/ppmtogdl/ppmtogdlcontroller.rb, line 21
def initialize()
  $LOG.debug "PpmToGdlController::initialize"
  @cfg = PpmToGdlCfg.new.load
  @verbose = false
  @customer = ""
  @srcPath = ""
  @destPath = ""
end

Public Instance Methods

customer=( customer ) click to toggle source
# File lib/ppmtogdl/ppmtogdlcontroller.rb, line 30
def customer=( customer )
  @customer = customer
end
doSomething() click to toggle source
# File lib/ppmtogdl/ppmtogdlcontroller.rb, line 41
def doSomething()
  $LOG.debug "PpmToGdlController::doSomething"
  options = {}
  options["customer"] = @customer   # FIXME: I think these should be symbols now, not strings.
  options["verbose"]  = @verbose

  destFile = ""
  destFile = File.basename(@destPath) unless File.directory?(@destPath)
  if(!destFile.empty?)
    options[:destfile] = destFile
  end
  destDir  = @destPath
  destDir  = File.dirname(@destPath) unless File.directory?(@destPath)
  if(destDir.length() < 1)
    destDir = Dir.getwd()
  end
  options[:destdir] = destDir

  docBuilder = GdlDocBuilder.new(options)
  docBuilder.createDocument(@srcPath)
end
noCmdLineArg() click to toggle source
# File lib/ppmtogdl/ppmtogdlcontroller.rb, line 74
def noCmdLineArg()
  $LOG.debug "PpmToGdlController::noCmdLineArg"
  #exit "Should never reach here."
end
setFilenames(arg) click to toggle source
# File lib/ppmtogdl/ppmtogdlcontroller.rb, line 64
def setFilenames(arg)
  $LOG.debug "PpmToGdlController::setFilenames( #{arg} )"
  @srcPath  = arg[0]
  @destPath = arg[1]

  @srcPath  = File.rubypath(@srcPath)
  @destPath = File.rubypath(@destPath)
end
verbose=( verbose ) click to toggle source
# File lib/ppmtogdl/ppmtogdlcontroller.rb, line 35
def verbose=( verbose )
  return unless (verbose == true || verbose == false)
  @verbose = verbose
end