lib/gloo/objs/cli/prompt.rb in gloo-0.6.1 vs lib/gloo/objs/cli/prompt.rb in gloo-0.7.0

- old
+ new

@@ -50,20 +50,24 @@ # --------------------------------------------------------------------- # Children # --------------------------------------------------------------------- + # # Does this object have children to add when an object # is created in interactive mode? # This does not apply during obj load, etc. + # def add_children_on_create? return true end + # # Add children to this object. # This is used by containers to add children needed # for default configurations. + # def add_default_children fac = $engine.factory fac.create_string PROMPT, '>', self fac.create_string RESULT, nil, self end @@ -97,37 +101,9 @@ prompt = prompt_value return unless prompt result = $prompt.ask( prompt ) set_result result - end - - # --------------------------------------------------------------------- - # Help - # --------------------------------------------------------------------- - - # - # Get help for this object type. - # - def self.help - return <<~TEXT - PROMPT OBJECT TYPE - NAME: prompt - SHORTCUT: ask - - DESCRIPTION - CLI prompt for user input. - - CHILDREN - prompt - string - '> ' - The prompt displayed to the user. - result - string - none - The result with the user's input. - - MESSAGES - run - Prompt the user and then set the result. - multiline - Show a multiline prompt. - TEXT end end end end