Class: TaskJuggler::AttributeDefinition
- Defined in:
- lib/taskjuggler/AttributeDefinition.rb
Overview
The AttributeDefinition describes the meta information of a PropertyTreeNode attribute. It contains various information about the attribute. Based on these bits of information, the PropertySet objects generate the attribute lists for each PropertyTreeNode upon creation of the node.
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#inheritedFromParent ⇒ Object
readonly
Returns the value of attribute inheritedFromParent.
-
#inheritedFromProject ⇒ Object
readonly
Returns the value of attribute inheritedFromProject.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#objClass ⇒ Object
readonly
Returns the value of attribute objClass.
-
#scenarioSpecific ⇒ Object
readonly
Returns the value of attribute scenarioSpecific.
-
#userDefined ⇒ Object
readonly
Returns the value of attribute userDefined.
Instance Method Summary collapse
-
#initialize(id, name, objClass, inheritedFromParent, inheritedFromProject, scenarioSpecific, default, userDefined = false) ⇒ AttributeDefinition
constructor
Create a new AttributeDefinition.
Constructor Details
#initialize(id, name, objClass, inheritedFromParent, inheritedFromProject, scenarioSpecific, default, userDefined = false) ⇒ AttributeDefinition
Create a new AttributeDefinition. id is the ID of the attribute. It must be unique within the PropertySet where it is used. name is a more descriptive text that will be used in report columns and the like. objClass is a reference to the class (not the object itself) of the attribute. The possible classes all have names ending in Attribute. inheritedFromParent is a boolean flag that needs to be true if the node can inherit the setting from the attribute of the parent node. inheritedFromProject is a boolen flag that needs to be true if the node can inherit the setting from an attribute in the global scope. scenarioSpecific is a boolean flag that is set to true if the attribute can have different values for each scenario. default is the default value that is set upon creation of the attribute.
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 37 def initialize(id, name, objClass, inheritedFromParent, inheritedFromProject, scenarioSpecific, default, userDefined = false) @id = id @name = name @objClass = objClass @inheritedFromParent = inheritedFromParent @inheritedFromProject = inheritedFromProject @scenarioSpecific = scenarioSpecific @default = default @userDefined = userDefined # Prevent objects from being deep copied. freeze end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
22 23 24 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 22 def default @default end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
22 23 24 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 22 def id @id end |
#inheritedFromParent ⇒ Object (readonly)
Returns the value of attribute inheritedFromParent.
22 23 24 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 22 def inheritedFromParent @inheritedFromParent end |
#inheritedFromProject ⇒ Object (readonly)
Returns the value of attribute inheritedFromProject.
22 23 24 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 22 def inheritedFromProject @inheritedFromProject end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 22 def name @name end |
#objClass ⇒ Object (readonly)
Returns the value of attribute objClass.
22 23 24 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 22 def objClass @objClass end |
#scenarioSpecific ⇒ Object (readonly)
Returns the value of attribute scenarioSpecific.
22 23 24 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 22 def scenarioSpecific @scenarioSpecific end |
#userDefined ⇒ Object (readonly)
Returns the value of attribute userDefined.
22 23 24 |
# File 'lib/taskjuggler/AttributeDefinition.rb', line 22 def userDefined @userDefined end |