Sha256: 1e4b83946a334fe259978874fc530704f584d03a173a989d48ef8be08872551b
Contents?: true
Size: 317 Bytes
Versions: 38
Compression:
Stored size: 317 Bytes
Contents
# encoding: utf-8 class MarkdownString # Return markdown code from text # # === Example # # MarkdownString.code('print "hoge"') # => '`print "hoge"`' # def self.code(text) return '``' if text.nil? return text unless text.is_a?(String) return '``' if text.empty? "`#{text}`" end end
Version data entries
38 entries across 38 versions & 1 rubygems