Sha256: 5591ae3286dac44f9f8ffd7ba4df9c7da7da953357225449236f56e86a7a0405

Contents?: true

Size: 421 Bytes

Versions: 127

Compression:

Stored size: 421 Bytes

Contents


module LogStash; module Config; module StringEscape
  class << self
    def process_escapes(input)
      input.gsub(/\\./) do |value|
        process(value)
      end
    end

    private
    def process(value)
      case value[1]
      when '"', "'", "\\"
        value[1]
      when "n"
        "\n"
      when "r"
        "\r"
      when "t"
        "\t"
      else
        value
      end
    end
  end
end end end

Version data entries

127 entries across 127 versions & 5 rubygems

Version Path
logstash-core-5.6.3-java lib/logstash/config/string_escape.rb
logstash-core-6.0.0.rc1-java lib/logstash/config/string_escape.rb
logstash-core-5.6.2-java lib/logstash/config/string_escape.rb
logstash-core-5.6.1-java lib/logstash/config/string_escape.rb
logstash-core-5.6.0-java lib/logstash/config/string_escape.rb
logstash-core-6.0.0.beta2-java lib/logstash/config/string_escape.rb
logstash-core-6.0.0.beta1-java lib/logstash/config/string_escape.rb