Sha256: ead14d06988cc86c537385b290d1987c1d950b96936ef57cf7f51815877426e8

Contents?: true

Size: 342 Bytes

Versions: 4

Compression:

Stored size: 342 Bytes

Contents

if defined?(Gon)
  # Monkey patching
  class Gon
    class << self
      def set_variable(name, value)
        if value.is_a?(::JsonDumper::Delayed)
          value = Class.new.extend(::JsonDumper::Helper).dumper_fetch(value)
        end
        current_gon.gon[::JsonDumper::KeyTransformer.camelize(name)] = value
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
json_dumper-0.3.0 lib/json_dumper/patches/gon.rb
json_dumper-0.2.0 lib/json_dumper/patches/gon.rb
json_dumper-0.1.1 lib/json_dumper/patches/gon.rb
json_dumper-0.1.0 lib/json_dumper/patches/gon.rb