Class | Core::Model::Support::Property |
In: |
core/model/support.rb
|
Parent: | Object |
Each property defined for a node inside the universe.xml will be loaded into an instance of this class. There are two types of properties: simple (Property) and multiple choice (MultipleChoiceProperty).
Property objects store the name, type and value of a property. They can be serialized to_xml.
key | [RW] | |
name | [RW] | |
populator | [RW] | |
type | [RW] | |
value | [RW] |
# File core/model/support.rb, line 35 def initialize(key, name, value, populator=nil) @key = key @name = name @value = value @populator = populator end
# File core/model/support.rb, line 56 def populator # If the populator has not been instantiated, do so now. There is no # problem if the populator is nil, instance_of? evaluates to +false+ if @populator.instance_of?(String) begin @populator = eval(@populator).new rescue $logger.error{ "There was an error instantiating #{@populator}: #{$!}" } $logger.debug{ $@ } @populator = nil end end return @populator end