Module: Rgviz::Tqx
- Defined in:
- lib/rgviz_rails/tqx.rb
Class Method Summary collapse
Class Method Details
.parse(tqx) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rgviz_rails/tqx.rb', line 3 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 |