Skip to content

Commit 5e9e464

Browse files
committed
Fix AnnotateRoutes.do_annotations and .remove_annotations so as to return message
1 parent 837c67a commit 5e9e464

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

lib/annotate/annotate_routes.rb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,22 @@
2323

2424
module AnnotateRoutes
2525
class << self
26+
# @param options [Hash]
27+
# @return [String]
2628
def do_annotations(options = {})
2729
routes_file = File.join('config', 'routes.rb')
28-
result = AnnotationProcessor.execute(options, routes_file)
29-
puts result
30+
AnnotationProcessor.execute(options, routes_file).tap do |result|
31+
puts result
32+
end
3033
end
3134

35+
# @param options [Hash]
36+
# @return [String]
3237
def remove_annotations(options = {})
3338
routes_file = File.join('config', 'routes.rb')
34-
result = RemovalProcessor.execute(options, routes_file)
35-
puts result
39+
RemovalProcessor.execute(options, routes_file).tap do |result|
40+
puts result
41+
end
3642
end
3743
end
3844
end

0 commit comments

Comments
 (0)