lib/brief/model/definition.rb in brief-1.11.10 vs lib/brief/model/definition.rb in brief-1.12.0
- old
+ new
@@ -8,10 +8,11 @@
:defined_helpers,
:defined_actions,
:section_mappings,
:template_body,
:example_body,
+ :_prompt,
:documentation_path,
:example_path,
:template_path
def initialize(name, options = {})
@@ -113,9 +114,13 @@
if body.is_a?(Hash)
options = body
elsif body.is_a?(String)
self.template_body = body
end
+ end
+
+ def prompt(&block)
+ self._prompt = block
end
def has_actions?
self.defined_actions.empty?
end