Skip to content

Commit d264bc0

Browse files
Improve the code documentation with indentation (#863)
that make the balise <code> inside the generated documentation Co-authored-by: Rafael Mendonça França <[email protected]>
1 parent f9320f3 commit d264bc0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: lib/thor/shell/basic.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ def indent(count = 1)
6767
# Readline.
6868
#
6969
# ==== Example
70-
# ask("What is your name?")
70+
# ask("What is your name?")
7171
#
72-
# ask("What is the planet furthest from the sun?", :default => "Pluto")
72+
# ask("What is the planet furthest from the sun?", :default => "Neptune")
7373
#
74-
# ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"])
74+
# ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"])
7575
#
76-
# ask("What is your password?", :echo => false)
76+
# ask("What is your password?", :echo => false)
7777
#
78-
# ask("Where should the file be saved?", :path => true)
78+
# ask("Where should the file be saved?", :path => true)
7979
#
8080
def ask(statement, *args)
8181
options = args.last.is_a?(Hash) ? args.pop : {}
@@ -93,7 +93,7 @@ def ask(statement, *args)
9393
# are passed straight to puts (behavior got from Highline).
9494
#
9595
# ==== Example
96-
# say("I know you knew that.")
96+
# say("I know you knew that.")
9797
#
9898
def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
9999
return if quiet?
@@ -110,7 +110,7 @@ def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/)
110110
# are passed straight to puts (behavior got from Highline).
111111
#
112112
# ==== Example
113-
# say_error("error: something went wrong")
113+
# say_error("error: something went wrong")
114114
#
115115
def say_error(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
116116
return if quiet?

Diff for: lib/thor/shell/html.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def set_color(string, *colors)
6767
# Ask something to the user and receives a response.
6868
#
6969
# ==== Example
70-
# ask("What is your name?")
70+
# ask("What is your name?")
7171
#
7272
# TODO: Implement #ask for Thor::Shell::HTML
7373
def ask(statement, color = nil)

0 commit comments

Comments
 (0)