lib/parameters/param.rb in parameters-0.3.1 vs lib/parameters/param.rb in parameters-0.4.0

- old
+ new

@@ -22,10 +22,12 @@ # The enforced type of the parameter. # # @param [String, nil] description # The description of the parameter. # + # @api semipublic + # def initialize(name,type=nil,description=nil) @name = name.to_sym @type = if (type.kind_of?(Types::Type)) || (type.kind_of?(Class) && (type < Types::Type)) type @@ -34,19 +36,19 @@ end @description = description end - protected - # # Coerces the value into the param type. # # @param [Object] value # The value to coerce. # # @return [Object] # The coerced value. + # + # @api semipublic # def coerce(value) if (value.nil? || (@type === value)) value else