Sha256: 7ae83956bac1da580488f24540468218b661a78c96cc94a27914a251581df49a

Contents?: true

Size: 221 Bytes

Versions: 7

Compression:

Stored size: 221 Bytes

Contents

class String
  def prepend_each(separator, value)
    lines(separator).collect { |x| value + x }.join
  end
  def shellescape
    empty? ? "''" : gsub(/([^A-Za-z0-9_\-.,:\/@\n])/n, '\\\\\\1').gsub(/\n/, "'\n'")
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
transcriptic-0.2.10 lib/transcriptic/core_ext/string.rb
transcriptic-0.2.5 lib/transcriptic/core_ext/string.rb
transcriptic-0.2.4 lib/transcriptic/core_ext/string.rb
transcriptic-0.2.3 lib/transcriptic/core_ext/string.rb
transcriptic-0.2.2 lib/transcriptic/core_ext/string.rb
transcriptic-0.2.1 lib/transcriptic/core_ext/string.rb
transcriptic-0.2.0 lib/transcriptic/core_ext/string.rb