lib/parameters/class_param.rb in parameters-0.1.0 vs lib/parameters/class_param.rb in parameters-0.1.1

- old
+ new

@@ -8,13 +8,32 @@ # # Creates a new ClassParam object with the specified _name_, # given _description_ and _value_. # - def initialize(name,description='',value=nil) + def initialize(name,description=nil,value=nil) super(name,description) @value = value + end + + # + # Returns the String representation of the class param. + # + def to_s + text = " #{@name}" + + text << " [#{@value}]" if @value + text << "\t#{@description}" if @description + + return text + end + + # + # Inspects the class params value. + # + def inspect + @value.inspect end end end