module RdocReport
RdocReport — Ibis-style IRC cards for !rdoc replies. Public: started, success, failure, denial, usage, format_result Depends: IrcReply, TextUtil Tests: test/lib/rdoc_report_test.rb, test/plugins/rdoc_test.rb
Constants
- TAG
Public Instance Methods
Source
# File lib/rdoc_report.rb, line 36 def denial IrcReply.error( tag: TAG, message: "Only channel ops and registered admins can use !rdoc." ) end
Source
# File lib/rdoc_report.rb, line 29 def failure(stderr:) snippet = TextUtil.truncate(stderr.to_s.strip, 200) snippet = "rake doc failed" if snippet.empty? IrcReply.error(tag: TAG, message: snippet) end
Source
# File lib/rdoc_report.rb, line 50 def format_result(result) case result[:status] when :ok success(index_path: result[:index_path]) else failure(stderr: result[:stderr]) end end
Source
# File lib/rdoc_report.rb, line 16 def started "Regenerating API documentation…" end
Source
# File lib/rdoc_report.rb, line 20 def success(index_path:) IrcReply.card( tag: TAG, title: "API documentation updated", body_lines: ["#{index_path} ready · output overwritten"], footer_parts: ["rake doc", "doc/api"] ) end
Source
# File lib/rdoc_report.rb, line 43 def usage IrcReply.error( tag: TAG, message: "Usage: !rdoc or !rdoc update — regenerate doc/api (rake doc)." ) end