Sha256: d6a20aee321706897cec5775af9927dbcb52044099f56efcf039ea0291ed9661

Contents?: true

Size: 299 Bytes

Versions: 6

Compression:

Stored size: 299 Bytes

Contents

require 'sflowtool/sflowtool'

module Sflowtool
  class << self
    def parse(data, exporter)
      purge_trailing_commas(receive_sflow_datagram(data, exporter))
    end

    private

    def purge_trailing_commas(str)
      str.gsub! ',]', ']'
      str.gsub! ',}', '}'
      str
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fluent-plugin-sflow-0.3.3 lib/sflowtool.rb
fluent-plugin-sflow-0.3.2 lib/sflowtool.rb
fluent-plugin-sflow-0.2.1 lib/sflowtool.rb
fluent-plugin-sflow-0.3.1 lib/sflowtool.rb
fluent-plugin-sflow-0.3.0 lib/sflowtool.rb
fluent-plugin-sflow-0.2.0 lib/sflowtool.rb