Sha256: 6b3e66804b9a38cac3a60118df5679daea96be17b562c59516d9c9605ee43c18
Contents?: true
Size: 364 Bytes
Versions: 27
Compression:
Stored size: 364 Bytes
Contents
class String # Escapes string for use with Objective-C # def to_obj_c "\\\@\\\"#{self}\\\"" end # Escapes string for use with C # def to_c "\\\"#{self}\\\"" end # Strips heredoc indents # def strip_heredoc indent = scan(/^[ \t]*(?=\S)/).min indent_len = (indent || '').length gsub(/^[ \t]{#{indent_len}}/, '') end end
Version data entries
27 entries across 27 versions & 1 rubygems