Sha256: c13be73a53d8d90c81bc01ffdabef2406a168f38871c3f4ba8e51c8ab7aaf1a6

Contents?: true

Size: 330 Bytes

Versions: 33

Compression:

Stored size: 330 Bytes

Contents

# Wrapper for string that is already json
# inspired by: http://grosser.it/2013/10/16/compiled-json-for-partially-cached-json-response-precompiled-handlebar-templates/
class HalApi::Representer::Caches::SerializedJson
  def initialize(s); @s = s; end
  def to_json(*args); @s; end
  def to_s; @s; end

  undef_method :as_json
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
hal_api-rails-1.2.2 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.2.1 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.2.0 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.1.5 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.1.4 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.3.7 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.3.6 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.1.3 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.3.5 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.1.2 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.1.1 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.1.0 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-1.0.0 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.7.0 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.6.0 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.5.0 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.4.1 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.4.0 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.3.4 lib/hal_api/representer/caches/serialized_json.rb
hal_api-rails-0.3.3 lib/hal_api/representer/caches/serialized_json.rb