class PpmToGdl::ContextListener

Attributes

context[R]

Public Class Methods

new(ctx) click to toggle source
Calls superclass method
# File lib/ppmtogdl/contextlistener.rb, line 20
def initialize(ctx)
$LOG.debug "ContextListener::initialize()"
  super()
  @context    = ctx
end

Public Instance Methods

openPPM(attributes) click to toggle source

Add a PPM variable to the context object

attributes

PPM element attributes

# File lib/ppmtogdl/contextlistener.rb, line 28
def openPPM(attributes)
$LOG.debug "ContextListener::openPPM( #{attributes} )"

  if(@context.options.has_key?("customer") && !@context.options["customer"].empty?)
    return unless (attributes.has_key?("Customer") && attributes["Customer"].include?(@context.options["customer"]))
  end
  ppmAlias  = attributes["Name"]
  confName  = "p" + @context.createValidName(ppmAlias)
  ppm = MPpm.new(confName, attributes)

  @context.ppms[ppmAlias] = ppm
end