Class TaskJuggler::ScenarioData
In: lib/taskjuggler/ScenarioData.rb
Parent: Object

Methods

a   deep_clone   error   info   new   warning  

Attributes

property  [R] 

Public Class methods

[Source]

# File lib/taskjuggler/ScenarioData.rb, line 23
    def initialize(property, idx, attributes)
      @property = property
      @project = property.project
      @scenarioIdx = idx
      @attributes = attributes
      @messageHandler = MessageHandlerInstance.instance

      # Register the scenario with the Task.
      @property.data[idx] = self
    end

Public Instance methods

[Source]

# File lib/taskjuggler/ScenarioData.rb, line 41
    def a(attributeName)
      @attributes[attributeName].get
    end

We only use deep_clone for attributes, never for properties. Since attributes may reference properties these references should remain references.

[Source]

# File lib/taskjuggler/ScenarioData.rb, line 37
    def deep_clone
      self
    end

[Source]

# File lib/taskjuggler/ScenarioData.rb, line 45
    def error(id, text, sourceFileInfo = nil, property = nil)
      @messageHandler.error(
        id, text, sourceFileInfo || @property.sourceFileInfo, nil,
        property || @property,
        @project.scenario(@scenarioIdx))
    end

[Source]

# File lib/taskjuggler/ScenarioData.rb, line 59
    def info(id, text, sourceFileInfo = nil, property = nil)
      @messageHandler.info(
        id, text, sourceFileInfo || @property.sourceFileInfo, nil,
        property || @property,
        @project.scenario(@scenarioIdx))
    end

[Source]

# File lib/taskjuggler/ScenarioData.rb, line 52
    def warning(id, text, sourceFileInfo = nil, property = nil)
      @messageHandler.warning(
        id, text, sourceFileInfo || @property.sourceFileInfo, nil,
        property || @property,
        @project.scenario(@scenarioIdx))
    end

[Validate]