Skip to content

Commit 7f12569

Browse files
authored
Fix broken ACON::Question docs (athena-framework/athena#565)
1 parent 1c399d4 commit 7f12569

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

src/question/choice.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ require "./abstract_choice"
55
#
66
# ```
77
# question = ACON::Question::Choice.new "What is your favorite color?", {"red", "blue", "green"}
8+
#
9+
# helper = self.helper ACON::Helper::Question
810
# color = helper.ask input, output, question
911
# ```
1012
#
@@ -26,6 +28,8 @@ require "./abstract_choice"
2628
#
2729
# ```
2830
# question = ACON::Question::Choice.new "What is your favorite color?", {"c1" => "red", "c2" => "blue", "c3" => "green"}, "c2"
31+
#
32+
# helper = self.helper ACON::Helper::Question
2933
# color = helper.ask input, output, question
3034
# ```
3135
#

src/question/confirmation.cr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# ```
44
# question = ACON::Question::Confirmation.new "Continue with this action?", false
5+
# helper = self.helper ACON::Helper::Question
56
#
67
# if !helper.ask input, output, question
78
# return ACON::Command::Status::SUCCESS

src/question/multiple_choice.cr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ require "./abstract_choice"
55
#
66
# ```
77
# question = ACON::Question::MultipleChoice.new "What is your favorite color?", {"red", "blue", "green"}
8+
#
9+
# helper = self.helper ACON::Helper::Question
810
# answer = helper.ask input, output, question
911
# ```
1012
#

src/question/question.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ require "./base"
88
#
99
# ```
1010
# question = ACON::Question(String?).new "What is your name?", nil
11+
#
12+
# helper = self.helper ACON::Helper::Question
1113
# name = helper.ask input, output, question
1214
# ```
1315
#
@@ -22,6 +24,8 @@ require "./base"
2224
# ```
2325
# question = ACON::Question(String?).new "What is your name?", nil
2426
# question.trimmable = false
27+
#
28+
# helper = self.helper ACON::Helper::Question
2529
# name_with_whitespace_and_newline = helper.ask input, output, question
2630
# ```
2731
#

0 commit comments

Comments
 (0)