Sha256: 252165bea8cebad563d79008cf095971cd056626190a78c75443c0e02c7d75fd
Contents?: true
Size: 374 Bytes
Versions: 16
Compression:
Stored size: 374 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 = self.scan(/^[ \t]*(?=\S)/).min indent_len = (indent || "").length self.gsub(/^[ \t]{#{indent_len}}/, "") end end
Version data entries
16 entries across 16 versions & 1 rubygems