Sha256: ae2b20b52f4a1690acb60000aca977bbcc8f0b960d49895cb9949387fe99ff58

Contents?: true

Size: 453 Bytes

Versions: 47

Compression:

Stored size: 453 Bytes

Contents

module Rgviz
  module Tqx
    def self.parse(tqx)
      tqx ||= ''
      pieces = tqx.split ';'
      
      map = {
        'reqId' => '0', 
        'version' => '0.6', 
        'responseHandler' => 'google.visualization.Query.setResponse',
        'out' => 'json'
        }
        
      pieces.each do |p|
        key_value = p.split ':'
        map[key_value[0]] = key_value[1] if key_value.length == 2
      end
      
      map
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
rgviz-rails-0.35 lib/rgviz_rails/tqx.rb
rgviz-rails-0.34 lib/rgviz_rails/tqx.rb
rgviz-rails-0.32 lib/rgviz_rails/tqx.rb
rgviz-rails-0.31 lib/rgviz_rails/tqx.rb
rgviz-rails-0.30 lib/rgviz_rails/tqx.rb
rgviz-rails-0.29 lib/rgviz_rails/tqx.rb
rgviz-rails-0.28 lib/rgviz_rails/tqx.rb