# File lib/taskjuggler/ScenarioData.rb, line 22 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
# File lib/taskjuggler/ScenarioData.rb, line 40 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.
# File lib/taskjuggler/ScenarioData.rb, line 36 def deep_clone self end
# File lib/taskjuggler/ScenarioData.rb, line 44 def error(id, text, sourceFileInfo = nil, property = nil) @messageHandler.error( id, text, sourceFileInfo || @property.sourceFileInfo, nil, property || @property, @project.scenario(@scenarioIdx)) end
# File lib/taskjuggler/ScenarioData.rb, line 58 def info(id, text, sourceFileInfo = nil, property = nil) @messageHandler.info( id, text, sourceFileInfo || @property.sourceFileInfo, nil, property || @property, @project.scenario(@scenarioIdx)) end
# File lib/taskjuggler/ScenarioData.rb, line 51 def warning(id, text, sourceFileInfo = nil, property = nil) @messageHandler.warning( id, text, sourceFileInfo || @property.sourceFileInfo, nil, property || @property, @project.scenario(@scenarioIdx)) end