Sha256: bd999393d8637be48abdf951c80b9de8cefb86327c0ac5781f12008a5a72e380
Contents?: true
Size: 403 Bytes
Versions: 41
Compression:
Stored size: 403 Bytes
Contents
# encoding: utf-8 class MarkdownString # Return markdown bold from text # # === Example # # case list # # MarkdownString.bold("hoge") # '**hoge**' # MarkdownString.bold("") # '****' # MarkdownString.bold(nil) # '****' # def self.bold(text) return '****' if text.nil? return text unless text.is_a?(String) return '****' if text.empty? "**#{text}**" end end
Version data entries
41 entries across 41 versions & 1 rubygems