lib/rbbt/workflow/annotate.rb in rbbt-util-4.0.0 vs lib/rbbt/workflow/annotate.rb in rbbt-util-4.0.1

- old
+ new

@@ -1,10 +1,10 @@ module AnnotatedModule def self.extended(base) if not base.respond_to? :inputs class << base - attr_accessor :description, :inputs, :input_types, :input_descriptions, :input_defaults + attr_accessor :description, :inputs, :input_types, :input_descriptions, :input_defaults, :result_description def description i = @description; @description = ""; i end @@ -25,18 +25,26 @@ end def description i = @description; @description = ""; i end + + def result_description + i = @result_description; @result_description = nil; i + end end base.description = "" base.inputs = [] base.input_types = {} base.input_descriptions = {} base.input_defaults = {} end + end + + def returns(text) + @result_description = text end def desc(description) @description = description end