lib/kumogata/ext/string_ext.rb in kumogata-0.2.11 vs lib/kumogata/ext/string_ext.rb in kumogata-0.2.12

- old
+ new

@@ -23,9 +23,17 @@ end end EOS end + def colorize_as(lang) + if @@colorize + CodeRay.scan(self, lang).terminal + else + self + end + end + def encode64 Base64.encode64(self).delete("\n") end def undent